Skip to content

Commit

Permalink
Fix checking admin mode, #144
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Jan 3, 2024
1 parent 3290a88 commit 17aab13
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/user/AdminModeBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import { useAuth } from "@/auth/auth.composable";
import ActionButton from "@/components/ActionButton.vue";
import useAdmin from "./admin.composable";
const { requireAuthentication } = useAuth();
const { refreshJwt } = useAuth();
const { adminMode, isAdmin, checkAdminMode, disableAdminMode } = useAdmin();
requireAuthentication(() => {
(async () => {
await refreshJwt();
if (isAdmin.value) checkAdminMode();
});
})();
function disable() {
disableAdminMode();
Expand Down

0 comments on commit 17aab13

Please sign in to comment.