增加了账号管理的分组功能
This commit is contained in:
@@ -36,11 +36,16 @@ export const userApi = {
|
||||
};
|
||||
|
||||
export const accountApi = {
|
||||
list: (assigned_only?: boolean) =>
|
||||
api.get<any, any[]>('/accounts', { params: assigned_only ? { assigned_only: true } : {} }),
|
||||
list: (params?: { assigned_only?: boolean; tag?: string }) =>
|
||||
api.get<any, any[]>('/accounts', { params }),
|
||||
import: (text: string) => api.post<any, any>('/accounts/import', { text }),
|
||||
assign: (id: number, assigned_to: number | null) =>
|
||||
api.put<any, any>(`/accounts/${id}/assign`, { assigned_to }),
|
||||
setTag: (id: number, tag: string) =>
|
||||
api.put<any, any>(`/accounts/${id}/tag`, { tag }),
|
||||
batchTag: (account_ids: number[], tag: string) =>
|
||||
api.put<any, any>('/accounts/batch-tag', { account_ids, tag }),
|
||||
listTags: () => api.get<any, string[]>('/accounts/tags/list'),
|
||||
delete: (id: number) => api.delete<any, any>(`/accounts/${id}`),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user