Skip to content

Task 7#214

Open
nextsukhorutchenko wants to merge 6 commits into
rolling-scopes-school:mainfrom
nextsukhorutchenko:task-7
Open

Task 7#214
nextsukhorutchenko wants to merge 6 commits into
rolling-scopes-school:mainfrom
nextsukhorutchenko:task-7

Conversation

@nextsukhorutchenko
Copy link
Copy Markdown

What was done?

Implemented client-side support for Task 7 Authorization:

  • Import request reads authorization_token from browser localStorage
  • Import request sends Authorization: Basic {authorization_token} header to /import
  • Added alerts for 401 and 403 API responses
  • Fixed frontend test setup for current Product Service API path
  • Stabilized MSW test dependency resolution

Client Application:
https://ddiqx6yb3n1i1.cloudfront.net/admin/products

Import Page:
https://ddiqx6yb3n1i1.cloudfront.net/admin/import

Import Service API:
https://qsutnud80j.execute-api.eu-west-1.amazonaws.com/prod/import?name=test.csv

Backend PR:
https://github.com/nextsukhorutchenko/aws-shop-backend/pull/new/task-7

Authorization token for reviewers:
bmV4dHN1a2hvcnV0Y2hlbmtvOlRFU1RfUEFTU1dPUkQ=

How to test:

  1. Open the client application.
  2. In browser DevTools Console run:
    localStorage.setItem('authorization_token', 'bmV4dHN1a2hvcnV0Y2hlbmtvOlRFU1RfUEFTU1dPUkQ=')
  3. Open /admin/import.
  4. Upload a CSV file.

Checks:

  • npm run build passed
  • npm test -- --run passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant