File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
packages/db/src/impl/pouch Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export class AdminDB implements AdminDBInterface {
6060 public async getClassrooms ( ) {
6161 // const joincodes =
6262 const uuids = (
63- await ClassroomLookupDB . allDocs < { uuid : string } > ( {
63+ await ClassroomLookupDB ( ) . allDocs < { uuid : string } > ( {
6464 include_docs : true ,
6565 } )
6666 ) . rows . map ( ( r ) => r . doc ! . uuid ) ;
Original file line number Diff line number Diff line change 66import { ClassroomConfig } from '@vue-skuilder/common' ;
77import { ENV } from '@/factory' ;
88import moment from 'moment' ;
9- import pouch from 'pouchdb' ;
9+ import pouch from './ pouchdb-setup ' ;
1010import {
1111 getCourseDB ,
1212 getStartAndEndKeys ,
@@ -286,12 +286,10 @@ export class TeacherClassroomDB extends ClassroomDBBase implements TeacherClassr
286286 }
287287}
288288
289- export const ClassroomLookupDB : PouchDB . Database = new pouch (
290- ENV . COUCHDB_SERVER_PROTOCOL + '://' + ENV . COUCHDB_SERVER_URL + classroomLookupDBTitle ,
291- {
289+ export const ClassroomLookupDB : ( ) => PouchDB . Database = ( ) =>
290+ new pouch ( ENV . COUCHDB_SERVER_PROTOCOL + '://' + ENV . COUCHDB_SERVER_URL + classroomLookupDBTitle , {
292291 skip_setup : true ,
293- }
294- ) ;
292+ } ) ;
295293
296294export function getClassroomDB ( classID : string , version : 'student' | 'teacher' ) : PouchDB . Database {
297295 const dbName = `classdb-${ version } -${ classID } ` ;
You can’t perform that action at this time.
0 commit comments