Skip to content

Commit

Permalink
Update api uilib (#37)
Browse files Browse the repository at this point in the history
* update api-uilib

* fix urlScopes type in LocalStorage
  • Loading branch information
BatuevIO authored Nov 24, 2024
1 parent 33a4952 commit 8adf33d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.14.0",
"@mdi/font": "^7.4.47",
"@profcomff/api-uilib": "^2024.10.22",
"@profcomff/api-uilib": "^2024.11.24",
"@types/eslint__js": "^8.42.3",
"@types/node": "^22.9.0",
"@typescript-eslint/eslint-plugin": "^8.13.0",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/store/profileStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const useProfileStore = defineStore('profile', () => {
token.value = urlToken === null ? undefined : urlToken;
sessionScopes.value = urlScopes || [];
LocalStorage.set(LocalStorageItem.Token, urlToken);
LocalStorage.set(LocalStorageItem.TokenScopes, urlScopes);
LocalStorage.set(LocalStorageItem.TokenScopes, urlScopes ?? []);
}

const currId = url.searchParams.get('user_id') ?? LocalStorage.get(LocalStorageItem.UserId) ?? undefined;
Expand All @@ -38,6 +38,7 @@ export const useProfileStore = defineStore('profile', () => {
};

const isAdmin = () => {
console.log(sessionScopes);
return (
(sessionScopes.value?.includes('rating.comment.review') &&
sessionScopes.value?.includes('rating.comment.review')) ??
Expand Down

0 comments on commit 8adf33d

Please sign in to comment.