Skip to content

Commit

Permalink
feat: isAdmin 함수 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene028 committed Aug 13, 2024
1 parent 38dcff3 commit 0ccf38f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
11 changes: 11 additions & 0 deletions apps/admin/utils/isAdmin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { fetcher } from "@wow-class/utils";
import { apiPath } from "constants/apiPath";
import type { User } from "types/user";

const isAdmin = async () => {
const { data } = await fetcher.get<User>(apiPath.dashboard);

return data?.manageRole === "ADMIN";
};

export default isAdmin;
11 changes: 0 additions & 11 deletions apps/admin/utils/isMentor.ts

This file was deleted.

0 comments on commit 0ccf38f

Please sign in to comment.