✨ 新增回收站与操作记录页面
This commit is contained in:
1 parent
d47d0edbce
commit
2bf610ac22
14 files changed
+418
-1
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import api from './client'
|
||||
import type { ApiResponse, TrashListParams, TrashListResponse } from '@/types'
|
||||
|
||||
export class TrashService {
|
||||
static async list(params: TrashListParams): Promise<ApiResponse<TrashListResponse>> {
|
||||
return api.get('/admin/trash/list', { params })
|
||||
}
|
||||
|
||||
static async restore(id: number): Promise<ApiResponse> {
|
||||
return api.post('/admin/trash/restore', { id })
|
||||
}
|
||||
|
||||
static async purge(id: number): Promise<ApiResponse> {
|
||||
return api.delete('/admin/trash/purge', { data: { id } })
|
||||
}
|
||||
|
||||
static async updateRetention(id: number, retentionDays: number): Promise<ApiResponse> {
|
||||
return api.post('/admin/trash/retention', { id, retentionDays })
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user