diff --git a/squarenotsquare/src/realm/dbAPI.js b/squarenotsquare/src/realm/dbAPI.js index 60f506f..24d77d8 100644 --- a/squarenotsquare/src/realm/dbAPI.js +++ b/squarenotsquare/src/realm/dbAPI.js @@ -1,29 +1,17 @@ import {systemRepo, userRepo, scoreRepo} from './dbInit'; -class realmAPI { - constructor(){ - if (realmDB === null) { - realmDB = this; - } - - return realmDB; - } - - getAllSystemValues() { - return systemRepo.getAllSystemValues(); - } +export function getAllSystemValues() { + return systemRepo.getAllSystemValues(); +} - createSystemValue(key, value) { - systemRepo.createSystemValue(key, value); - } - - deleteSystemValue(key) { - systemRepo.deleteSystemValue(key); - } +export function createSystemValue(key, value) { + systemRepo.createSystemValue(key, value); +} - getSystemValue(key) { - return systemRepo.getSystemKeyValue(key); - } +export function deleteSystemValue(key) { + systemRepo.deleteSystemValue(key); } -export let realmDB = new realmAPI(); \ No newline at end of file +export function getSystemValue(key) { + return systemRepo.getSystemKeyValue(key); +} \ No newline at end of file