Fixing wrong database queries

This commit is contained in:
Fabian Stamm
2018-11-06 21:27:07 +01:00
parent 9cfc5643a5
commit b65c93acfc
3 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ export default async function TestData() {
await Client.save(c);
}
let perm = await Permission.findOne({ where: { id: 0 } });
let perm = await Permission.findOne({ id: 0 });
if (!perm) {
Logging.log("Adding test permission")
perm = Permission.new({
@ -51,7 +51,7 @@ export default async function TestData() {
Permission.save(perm);
}
let r = await RegCode.findOne({ where: {} });
let r = await RegCode.findOne({ token: "test" });
if (!r) {
Logging.log("Adding test reg_code")
r = RegCode.new({