Feature/get requested #37

Merged
KevinMidboe merged 4 commits from feature/getRequested into master 2017-09-27 15:58:17 +00:00
Showing only changes of commit 509759bca8 - Show all commits

View File

@@ -20,7 +20,8 @@ class RequestRepository {
constructor(database) { constructor(database) {
this.database = database || establishedDatabase; this.database = database || establishedDatabase;
this.queries = { this.queries = {
'insertRequest': "INSERT INTO requests VALUES (?, ?, ?, ?, ?, ?, CURRENT_DATE)" 'insertRequest': "INSERT INTO requests VALUES (?, ?, ?, ?, ?, ?, CURRENT_DATE)",
'fetchRequstedItems': "SELECT * FROM requests",
} }
} }
@@ -162,6 +163,10 @@ class RequestRepository {
} }
fetchRequested() {
return this.database.all(this.queries.fetchRequstedItems);
}
} }
module.exports = RequestRepository; module.exports = RequestRepository;