Skip to content

Commit

Permalink
fix localstorage to not add email [#87]
Browse files Browse the repository at this point in the history
  • Loading branch information
RamonEbneter committed Apr 27, 2023
1 parent 6927754 commit 5e49f0b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions frontend/src/services/user-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export default class UserService extends AxiosBaseService {

public logout(): void {
localStorage.removeItem('bearerTokenGroceryMate');
localStorage.removeItem('userEmail');
}

public async getUserSettings(): Promise<{
Expand Down Expand Up @@ -59,9 +58,8 @@ export default class UserService extends AxiosBaseService {
emailAddress: userSettings.emailAddress,
residencyDetails: userSettings.residencyDetails ?? ' ',
};
const email = localStorage.getItem('userEmail');
return this.instance
.post('Settings', { user, address, email })
.post('Settings', { user, address })
.then(this.responseBody)
.catch(this.errorHandling);
}
Expand Down

0 comments on commit 5e49f0b

Please sign in to comment.