优化删除
This commit is contained in:
@@ -55,6 +55,10 @@ export interface UpdateQrCodePayload {
|
||||
clear_expires_at?: boolean
|
||||
}
|
||||
|
||||
export interface BatchDeleteQrCodeResult {
|
||||
deleted: number
|
||||
}
|
||||
|
||||
export async function fetchQrCodes(query: QrCodeListQuery = {}) {
|
||||
const { data } = await apiClient.get<ApiResponse<PaginatedResult<ChatQrCode>>>(
|
||||
'/admin/chats/qrcodes',
|
||||
@@ -111,3 +115,11 @@ export async function deleteQrCode(id: number) {
|
||||
const { data } = await apiClient.delete<ApiResponse<null>>(`/admin/chats/qrcodes/${id}`)
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function batchDeleteQrCodes(ids: number[]) {
|
||||
const { data } = await apiClient.post<ApiResponse<BatchDeleteQrCodeResult>>(
|
||||
'/admin/chats/qrcodes/batch-delete',
|
||||
{ ids }
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user