test without twofa
continuous-integration/drone/push Build is passing Details

adminDb
remrem 3 years ago
parent ea1422ebe0
commit f6098dfae3

@ -59,7 +59,8 @@ class API {
if (await checkRequiredFields(required, body)) { if (await checkRequiredFields(required, body)) {
AccountsToPostgres db = AccountsToPostgres(); AccountsToPostgres db = AccountsToPostgres();
List<String> twofa = body[required[3]]; List<String> twofa = body[required[3]];
db.create(body[required[0]], body[required[1]], body[required[2]], twofa); db.create(
body[required[0]], body[required[1]], body[required[2]] /*, twofa*/);
return Response.ok('true'); return Response.ok('true');
} else { } else {
return Response.badRequest(); return Response.badRequest();

@ -25,15 +25,15 @@ class AccountsToPostgres {
} }
@override @override
void create( void create(String email, String hash,
String email, String hash, String salt, List<String> twoFaStr) async { String salt /*, List<String> twoFaStr*/) async {
connection.query( connection.query(
"INSERT INTO \"Account\" VALUES(@id,@hash,@salt,@twofa,@passwords)", "INSERT INTO \"Account\" VALUES(@id,@hash,@salt,@twofa,@passwords)",
substitutionValues: { substitutionValues: {
"id": email, "id": email,
"hash": hash, "hash": hash,
"salt": salt, "salt": salt /*,
"twofa": twoFaStr "twofa": twoFaStr*/
}); });
print("Account succesfully created"); print("Account succesfully created");
} }

Loading…
Cancel
Save