Skip to content

Commit

Permalink
[#66] Add functions for userID
Browse files Browse the repository at this point in the history
  • Loading branch information
dewy-i committed Aug 9, 2021
1 parent 0df4842 commit 4c7b294
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/utils/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,15 @@ export function getToken() {
export function removeToken() {
localStorage.removeItem('token');
}

export function setUserID(userID) {
localStorage.setItem('userID', userID);
}

export function getUserID() {
return localStorage.getItem('userID');
}

export function removeUserID() {
localStorage.removeItem('userID');
}

0 comments on commit 4c7b294

Please sign in to comment.