File tree 4 files changed +9
-4
lines changed
4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ async function getKeys(this: Actor): Promise<PublicKeysResult | Error> {
90
90
91
91
export class Actor extends Observer {
92
92
public keys = cached ( locked ( getKeys ) , "keys" )
93
+
93
94
public backend : Backend
94
95
public actor : string
95
96
public id : string
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ describe("Provider.checkData()", function () {
21
21
await resetDB ( be , keys )
22
22
const med = await mediator ( be , keys )
23
23
const vp = await verifiedProvider ( be , keys , med )
24
- const result = await vp . checkData ( { } )
24
+ const result = await vp . checkData ( ) . get ( { } )
25
25
26
26
if ( result . status === Status . Failed )
27
27
throw new Error ( "cannot get confirmed data" )
Original file line number Diff line number Diff line change @@ -29,11 +29,13 @@ export * from "./helpers"
29
29
30
30
export class Provider extends Actor {
31
31
public backupData = locked ( backupData )
32
- public checkData = locked ( checkData )
33
32
public storeData = locked ( storeData )
34
33
public restoreFromBackup = locked ( restoreFromBackup )
35
34
public publishAppointments = locked ( publishAppointments )
36
35
public generateKeyPairs = locked ( generateKeyPairs )
36
+
37
+ // cached endpoints
38
+ public checkData = cached ( locked ( checkData ) , "checkData" )
37
39
public appointments = cached ( locked ( getAppointments ) , "appointments" )
38
40
39
41
// helper/convenience functions
Original file line number Diff line number Diff line change @@ -30,11 +30,13 @@ export class User extends Actor {
30
30
public cancelAppointment = locked ( cancelAppointment )
31
31
public generateKeyPairs = locked ( generateKeyPairs )
32
32
public bookAppointment = locked ( bookAppointment )
33
- public appointments = cached ( locked ( getAppointments ) , "appointments" )
34
- public appointment = cached ( locked ( getAppointment ) , "appointment" )
35
33
public backupData = locked ( backupData )
36
34
public getToken = locked ( getToken )
37
35
36
+ // cached endpoints
37
+ public appointments = cached ( locked ( getAppointments ) , "appointments" )
38
+ public appointment = cached ( locked ( getAppointment ) , "appointment" )
39
+
38
40
private generateSecret ( ) {
39
41
this . secret = buf2base32 ( b642buf ( randomBytes ( 10 ) ) )
40
42
}
You can’t perform that action at this time.
0 commit comments