2022-04-05 05:33:45 +00:00
|
|
|
import type { IPagination, IUser } from '@think/domains';
|
2022-05-16 09:23:59 +00:00
|
|
|
|
2022-04-01 04:13:23 +00:00
|
|
|
import { HttpClient } from './http-client';
|
2022-02-20 11:51:55 +00:00
|
|
|
|
|
|
|
export const register = (data: Partial<IUser>): Promise<IUser> => {
|
2022-03-12 02:31:03 +00:00
|
|
|
return HttpClient.post('/user/register', data);
|
2022-02-20 11:51:55 +00:00
|
|
|
};
|
2022-04-05 05:33:45 +00:00
|
|
|
|
|
|
|
export const getUsers = (): Promise<IUser[]> => {
|
|
|
|
return HttpClient.get('/user');
|
|
|
|
};
|