feat: refactor API response schemas for improve consistency
This commit is contained in:
@@ -1,13 +1,7 @@
|
||||
import { z } from 'zod'
|
||||
|
||||
import type { TRegisterSchema } from '~/layouts/news/form-register'
|
||||
import { HttpServer } from '~/libs/http-server'
|
||||
|
||||
const loginResponseSchema = z.object({
|
||||
data: z.object({
|
||||
token: z.string(),
|
||||
}),
|
||||
})
|
||||
import { loginResponseSchema } from './login-user'
|
||||
|
||||
export const userRegisterRequest = async (payload: TRegisterSchema) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user