Dim Dim 6 лет назад
Родитель
Сommit
36ec1fb96c
2 измененных файлов с 16 добавлено и 2 удалено
  1. 2 2
      database/repositories/cards.js
  2. 14 0
      database/repositories/decks.js

+ 2 - 2
database/repositories/cards.js

@@ -2,7 +2,7 @@ const db = require("../db.js");
 const CryptoJS = require('crypto-js');
 
 const CARDS_SEARCH_CRITERIA = {
-	'lt': 'card;',
+	'lt': 'card;', //TODO card; h card:?
 	'gt': 'card:'
 };
 
@@ -35,6 +35,6 @@ class CardsRepository {
 
 let cardsRepository = null;
 function getSingleton() { 
-	return cardsRepository = (cardsRepository === null ? new CardsRepository(): userRepository);
+	return cardsRepository = (cardsRepository === null ? new CardsRepository(): cardsRepository);
 }
 module.exports = getSingleton();

+ 14 - 0
database/repositories/decks.js

@@ -0,0 +1,14 @@
+const db = require("../db.js");
+
+class DecksRepository {
+//TODO continue
+    getDecksByUser(userid) {
+
+    }
+}
+
+let decksRepository = null;
+function getSingleton() {
+    return decksRepository = (decksRepository === null ? new DecksRepository(): decksRepository);
+}
+module.exports = getSingleton();