update bootstrapper and startup flow

This commit is contained in:
Matt Hill
2021-06-16 18:02:06 -06:00
committed by Aiden McClelland
parent e5de786cf1
commit 84718792bf
12 changed files with 114 additions and 84 deletions

View File

@@ -8,6 +8,7 @@ import { RR } from './api-types'
import { parsePropertiesPermissive } from 'src/app/util/properties.util'
import { Mock } from './mock-app-fixures'
import { HttpService } from '../http.service'
import { ConfigService } from '../config.service'
@Injectable()
export class MockApiService extends ApiService {
@@ -36,40 +37,40 @@ export class MockApiService extends ApiService {
// db
async getRevisions (since: number): Promise<RR.GetRevisionsRes> {
await pauseFor(2000)
return {
...Mock.DbDump,
id: this.nextSequence(),
}
// 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> {
await pauseFor(2000)
return {
...Mock.DbDump,
id: this.nextSequence(),
}
// 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> {
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 })
// 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