Dim Dim 6 anos atrás
pai
commit
36ec1fb96c
2 arquivos alterados com 16 adições e 2 exclusões
  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();