refactor: standardize access token variable naming across routes
This commit is contained in:
@@ -10,7 +10,7 @@ import { categorySchema, type TCategorySchema } from '~/pages/form-category'
|
||||
import type { Route } from './+types/actions.admin.categories.create'
|
||||
|
||||
export const action = async ({ request }: Route.ActionArgs) => {
|
||||
const { staffToken } = await handleCookie(request)
|
||||
const { staffToken: accessToken } = await handleCookie(request)
|
||||
try {
|
||||
const {
|
||||
errors,
|
||||
@@ -27,7 +27,7 @@ export const action = async ({ request }: Route.ActionArgs) => {
|
||||
}
|
||||
|
||||
const { data: categoryData } = await createCategoryRequest({
|
||||
accessToken: staffToken,
|
||||
accessToken,
|
||||
payload,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user