mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-30 03:36:37 +08:00
feat: add licensing and access controls
This commit is contained in:
@@ -4,6 +4,12 @@ import type { AccessLog, Setting, User } from '../types'
|
||||
export const adminAPI = {
|
||||
listUsers: () => api.get<User[]>('/admin/users').then((r) => r.data),
|
||||
|
||||
createUser: (payload: { username: string; password: string }) =>
|
||||
api.post<User>('/admin/users', payload).then((r) => r.data),
|
||||
|
||||
updateUser: (id: string, payload: { username: string }) =>
|
||||
api.patch<User>(`/admin/users/${id}`, payload).then((r) => r.data),
|
||||
|
||||
deleteUser: (id: string) => api.delete(`/admin/users/${id}`).then((r) => r.data),
|
||||
|
||||
listSettings: () => api.get<Setting[]>('/admin/settings').then((r) => r.data),
|
||||
|
||||
Reference in New Issue
Block a user