swaps logout to POST instead of GET
This commit is contained in:
@@ -65,7 +65,7 @@ const UserProvider = ({ children }) => {
|
||||
const logOut = () => {
|
||||
setUser(null);
|
||||
setTokenInMemory(null);
|
||||
requests.get(`${serverURL}${api}/${userSlug}/logout`);
|
||||
requests.post(`${serverURL}${api}/${userSlug}/logout`);
|
||||
};
|
||||
|
||||
// On mount, get user and set
|
||||
|
||||
@@ -74,7 +74,7 @@ function registerCollections() {
|
||||
|
||||
router
|
||||
.route(`/${slug}/logout`)
|
||||
.get(logout);
|
||||
.post(logout);
|
||||
|
||||
router
|
||||
.route(`/${slug}/refresh-token`)
|
||||
|
||||
Reference in New Issue
Block a user