File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ import { DocumentUpdater } from '@db/study';
1313/**
1414 * Read-only user data operations
1515 */
16- export interface UserDBReader extends DocumentUpdater {
16+ export interface UserDBReader {
17+ get < T > ( id : string ) : Promise < T & PouchDB . Core . RevisionIdMeta > ;
1718 getUsername ( ) : string ;
1819 isLoggedIn ( ) : boolean ;
1920
@@ -71,7 +72,7 @@ export interface UserDBReader extends DocumentUpdater {
7172/**
7273 * User data mutation operations
7374 */
74- export interface UserDBWriter {
75+ export interface UserDBWriter extends DocumentUpdater {
7576 /**
7677 * Update user configuration
7778 */
Original file line number Diff line number Diff line change @@ -217,6 +217,10 @@ Currently logged-in as ${this._username}.`
217217 return ret ;
218218 }
219219
220+ public async get < T > ( id : string ) : Promise < T & PouchDB . Core . RevisionIdMeta > {
221+ return this . localDB . get < T > ( id ) ;
222+ }
223+
220224 public update < T extends PouchDB . Core . Document < object > > ( id : string , update : Update < T > ) {
221225 return this . updateQueue . update ( id , update ) ;
222226 }
You can’t perform that action at this time.
0 commit comments