Built basic blog backend.

This commit is contained in:
2018-11-20 08:39:25 +11:00
parent 75764f744d
commit 8ab9f09287
34 changed files with 221 additions and 98 deletions

View File

@@ -68,12 +68,13 @@ class DatabaseConnection {
let keys = Object.keys(queries);
for(let i = 0; i < keys.length; i++) {
let k = keys[i];
if(!k.startsWith("Create")) return;
if(!k.toLowerCase().startsWith("create")) continue;
await this.none(k);
};
}
getQuery(name) {
if(!this.queries[name]) throw new Error("No Query by that name exists");
return this.queries[name];
}