From fd4f4025deadd3cbd620d8f74f22f899e4d29cb3 Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Fri, 19 Jul 2019 23:59:20 -0600 Subject: [PATCH] Fix database test data --- server/Database.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/Database.ts b/server/Database.ts index d46c206..98ca307 100644 --- a/server/Database.ts +++ b/server/Database.ts @@ -43,17 +43,17 @@ export class Database { } async insertTestData() { - const NUM = 100; + const NUM = 50; const users: User[] = []; for (let i = 0; i < NUM; i++) { - const username = "alex" + i % 50; + const username = "alex" + i; let user = await this.users.findByUsername(username); - // if (!user) { + if (!user) { user = await this.users.create({ name: "Alex Mikhalev" + i, username }); - // } + } await user.setPassword("kakashka" + i); users.push(user); }