mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
delete recovered
This commit is contained in:
committed by
Aiden McClelland
parent
7dcb4239df
commit
71ce2b064f
@@ -478,26 +478,32 @@ export class MockApiService extends ApiService {
|
||||
},
|
||||
]
|
||||
let res: any
|
||||
try {
|
||||
res = await this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
|
||||
setTimeout(async () => {
|
||||
const patch = [
|
||||
{
|
||||
op: PatchOp.REMOVE,
|
||||
path: `/package-data/${params.id}`,
|
||||
},
|
||||
]
|
||||
this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
|
||||
}, this.revertTime)
|
||||
} catch (e) {
|
||||
res = await this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
|
||||
setTimeout(async () => {
|
||||
const patch = [
|
||||
{
|
||||
op: PatchOp.REMOVE,
|
||||
path: `/recovered-packages/${params.id}`,
|
||||
path: `/package-data/${params.id}`,
|
||||
},
|
||||
]
|
||||
res = await this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
|
||||
}
|
||||
this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
|
||||
}, this.revertTime)
|
||||
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
async deleteRecoveredPackageRaw (params: RR.DeleteRecoveredPackageReq): Promise<RR.DeleteAllNotificationsRes> {
|
||||
await pauseFor(2000)
|
||||
let res: any
|
||||
|
||||
const patch = [
|
||||
{
|
||||
op: PatchOp.REMOVE,
|
||||
path: `/recovered-packages/${params.id}`,
|
||||
},
|
||||
]
|
||||
res = await this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user