wip: coding
This commit is contained in:
12
src/api/register/index.ts
Normal file
12
src/api/register/index.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import { IUserModel } from '@/api-types/user'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
export const getCodeApi = () => {
|
||||
return request.get<IResponse<string>>({ url: 'user/captcha' })
|
||||
}
|
||||
|
||||
export const registerApi = (data: Omit<IUserModel, 'is_admin'>) => {
|
||||
return request.post<IResponse<IUserModel>>({ url: 'user/register', data })
|
||||
}
|
||||
Reference in New Issue
Block a user