feat: restructure ads mgmt by creating a new layout for ads creation and updating related schemas
This commit is contained in:
@@ -5,10 +5,7 @@ import { XiorError } from 'xior'
|
||||
|
||||
import { createCategoryRequest } from '~/apis/admin/create-category'
|
||||
import { handleCookie } from '~/libs/cookies'
|
||||
import {
|
||||
createCategorySchema,
|
||||
type TCategorySchema,
|
||||
} from '~/pages/form-category'
|
||||
import { categorySchema, type TCategorySchema } from '~/pages/form-category'
|
||||
|
||||
import type { Route } from './+types/actions.register'
|
||||
|
||||
@@ -21,7 +18,7 @@ export const action = async ({ request }: Route.ActionArgs) => {
|
||||
receivedValues: defaultValues,
|
||||
} = await getValidatedFormData<TCategorySchema>(
|
||||
request,
|
||||
zodResolver(createCategorySchema),
|
||||
zodResolver(categorySchema),
|
||||
false,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user