Browse Source

remove class structure for db api

pull/1/head
Tim Glasgow 2 years ago
parent
commit
f5dae50a5c
  1. 26
      squarenotsquare/src/realm/dbAPI.js

26
squarenotsquare/src/realm/dbAPI.js

@ -1,29 +1,17 @@
import {systemRepo, userRepo, scoreRepo} from './dbInit'; import {systemRepo, userRepo, scoreRepo} from './dbInit';
class realmAPI { export function getAllSystemValues() {
constructor(){
if (realmDB === null) {
realmDB = this;
}
return realmDB;
}
getAllSystemValues() {
return systemRepo.getAllSystemValues(); return systemRepo.getAllSystemValues();
} }
createSystemValue(key, value) { export function createSystemValue(key, value) {
systemRepo.createSystemValue(key, value); systemRepo.createSystemValue(key, value);
} }
deleteSystemValue(key) { export function deleteSystemValue(key) {
systemRepo.deleteSystemValue(key); systemRepo.deleteSystemValue(key);
} }
getSystemValue(key) { export function getSystemValue(key) {
return systemRepo.getSystemKeyValue(key); return systemRepo.getSystemKeyValue(key);
}
} }
export let realmDB = new realmAPI();
Loading…
Cancel
Save