pour le respect
This commit is contained in:
1 parent
3adcdcbd78
commit
3bc18baa30
2 files changed
+8
-1
No files matched your search
@@ -11,6 +11,11 @@ const officialUsers: User[] = [
|
||||
passwordHashWithSalt:
|
||||
"5603007580f73044864e7a0b66744f405406eaaf28fa514d724ccf11d010bd89:070b1a477e6a877d44f31961dc0402a9f3258465eed73ab6a9110c461ac68714",
|
||||
},
|
||||
{
|
||||
username: "comite",
|
||||
passwordHashWithSalt:
|
||||
"8649feff48a50f53448e59ce480db97b5549eef1d92c886c49b5a14ee22648e5:a0017b879c8834d2f34938e7a4fa3f4c7be8f70545b9bb22a28cf56ab2eb26d9",
|
||||
},
|
||||
];
|
||||
|
||||
export class LoginService {
|
||||
@@ -103,7 +108,7 @@ export class LoginService {
|
||||
|
||||
Deno.test("login service", async (t) => {
|
||||
await t.step("hashing password", async () => {
|
||||
const service = new LoginService([]);
|
||||
const service = new LoginService([], "ss");
|
||||
const passwordHashWithSalt = await service.hashPassword("qwerty");
|
||||
assert(await service.verifyPassword("qwerty", passwordHashWithSalt));
|
||||
assertFalse(await service.verifyPassword("ytrewq", passwordHashWithSalt));
|
||||
|
||||
@@ -32,6 +32,8 @@ nextGameDaySchedule.oninit = async function () {
|
||||
nextGameDaySchedule._getNextNightGame = function (games, date) {
|
||||
return _(games)
|
||||
.filter((g) => g.jsDate.getTime() >= date.getTime())
|
||||
.sortBy("jsDate")
|
||||
.reverse()
|
||||
.last()
|
||||
.games.sort((g1, g2) => g1.jsDate - g2.jsDate);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user