mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
improve config and mock infra
This commit is contained in:
committed by
Aiden McClelland
parent
c5f2379c6e
commit
1b0173197f
@@ -36,15 +36,40 @@ export class MockApiService extends ApiService {
|
||||
// db
|
||||
|
||||
async getRevisions (since: number): Promise<RR.GetRevisionsRes> {
|
||||
return this.http.rpcRequest({ method: 'db.revisions', params: { since } })
|
||||
await pauseFor(2000)
|
||||
return {
|
||||
...Mock.DbDump,
|
||||
id: this.nextSequence(),
|
||||
}
|
||||
// return this.http.rpcRequest({ method: 'db.revisions', params: { since } })
|
||||
}
|
||||
|
||||
async getDump (): Promise<RR.GetDumpRes> {
|
||||
return this.http.rpcRequest({ method: 'db.dump' })
|
||||
await pauseFor(2000)
|
||||
return {
|
||||
...Mock.DbDump,
|
||||
id: this.nextSequence(),
|
||||
}
|
||||
// return this.http.rpcRequest({ method: 'db.dump' })
|
||||
}
|
||||
|
||||
async setDbValueRaw (params: RR.SetDBValueReq): Promise<RR.SetDBValueRes> {
|
||||
return this.http.rpcRequest({ method: 'db.put.ui', params })
|
||||
await pauseFor(2000)
|
||||
return {
|
||||
response: null,
|
||||
revision: {
|
||||
id: this.nextSequence(),
|
||||
patch: [
|
||||
{
|
||||
op: PatchOp.REPLACE,
|
||||
path: params.pointer,
|
||||
value: params.value,
|
||||
},
|
||||
],
|
||||
expireId: null,
|
||||
},
|
||||
}
|
||||
// return this.http.rpcRequest({ method: 'db.put.ui', params })
|
||||
}
|
||||
|
||||
// auth
|
||||
|
||||
Reference in New Issue
Block a user