feat: add API endpoints for fetching staff profiles and staff list
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user