Skip to content

Commit 5c99637

Browse files
committed
update code
1 parent 85fb7fe commit 5c99637

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

06-rest-api/02-auth/03-storage/front/src/core/api/api.helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import axios from 'axios';
22

33
export const setHeader = (header: string, value: string) => {
44
axios.defaults.headers.common[header] = value;
5-
sessionStorage.setItem(header, value);
5+
localStorage.setItem(header, value);
66
};
77

88
export const restoreHeader = (header: string) => {
9-
const value = sessionStorage.getItem(header);
9+
const value = localStorage.getItem(header);
1010
if (value) {
1111
axios.defaults.headers.common[header] = value;
1212
}

0 commit comments

Comments
 (0)