Skip to content

Commit 8e9221c

Browse files
committed
Task EPAM-JS-Competency-center#7 Authorization
- get auth token from local storage
1 parent 3872ed2 commit 8e9221c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/pages/admin/PageProductImport/components/CSVFileImport.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ export default function CSVFileImport({ url, title }: CSVFileImportProps) {
3030
return;
3131
}
3232
// Get the pre-signed URL
33+
const authorizationToken = localStorage.getItem("authorizationToken");
3334
const response = await axios({
3435
method: "GET",
35-
headers: { Authorization: "Basic ddm9yb3Noa292OlRFU1RfUEFTU1dPUkQ=" },
36+
headers: { Authorization: `Basic ${authorizationToken}` },
3637
url,
3738
params: {
3839
name: encodeURIComponent(file.name),

0 commit comments

Comments
 (0)