feat: add API endpoints for fetching staff profiles and staff list

This commit is contained in:
Ardeman
2025-03-25 19:07:29 +08:00
parent dce745f53d
commit 84451f1fd4
8 changed files with 82 additions and 72 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { isRouteErrorResponse, Outlet, redirect } from 'react-router'
import { getStaff } from '~/apis/admin/get-staff'
import { getProfile } from '~/apis/admin/get-profile'
import { AUTH_PAGES } from '~/configs/pages'
import { AdminDefaultLayout } from '~/layouts/admin/default'
import { handleCookie } from '~/libs/cookies'
@@ -14,7 +14,7 @@ export const loader = async ({ request }: Route.LoaderArgs) => {
let staffData
if (accessToken) {
const { data } = await getStaff({ accessToken })
const { data } = await getProfile({ accessToken })
staffData = data
}