mirror of
https://github.com/mgerb/go-discord-bot
synced 2026-01-11 01:22:48 +00:00
feat: add user admin page - various dependency updates
This commit is contained in:
14
client/app/services/user.service.ts
Normal file
14
client/app/services/user.service.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { IUser } from '../model';
|
||||
import { axios } from './axios.service';
|
||||
|
||||
export class UserService {
|
||||
public static async getUsers(): Promise<IUser[]> {
|
||||
const resp = await axios.get('/api/user');
|
||||
return resp.data.data;
|
||||
}
|
||||
|
||||
public static async putUsers(users: IUser[]): Promise<IUser[]> {
|
||||
const resp = await axios.put('/api/user', { users });
|
||||
return resp.data.data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user