同步处理
This commit is contained in:
1 parent
9939943e31
commit
6494ad2918
26 files changed
+970
-40
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { requireAdminAuth } from '../../../../utils/access'
|
||||
import { setAllFinishedBackupJobsHidden } from '../../../../utils/backup/jobs'
|
||||
|
||||
interface Body {
|
||||
hidden?: boolean
|
||||
}
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const user = await requireAdminAuth(event)
|
||||
const body = await readBody<Body>(event).catch(() => null)
|
||||
const hidden = body?.hidden !== false
|
||||
const updated = setAllFinishedBackupJobsHidden(user.id, hidden)
|
||||
return { success: true, hidden, updated }
|
||||
})
|
||||
Reference in new issue
Block a user