Skip to content

Commit b6f9cf6

Browse files
committed
removed hardcoded values
1 parent f99be6e commit b6f9cf6

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/migrations/1626737786922-init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export class init1626737786922 implements MigrationInterface {
55

66
public async up(queryRunner: QueryRunner): Promise<void> {
77
await queryRunner.query(`CREATE TABLE "active_session" ("id" varchar PRIMARY KEY NOT NULL, "token" text NOT NULL, "userId" text NOT NULL, "date" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP))`);
8-
await queryRunner.query(`CREATE TABLE "user" ("id" varchar PRIMARY KEY NOT NULL, "username" text NOT NULL, "email" text NOT NULL, "password" text NOT NULL, "date" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP))`);
8+
await queryRunner.query(`CREATE TABLE "user" ("id" varchar PRIMARY KEY NOT NULL, "username" text NOT NULL, "email" text, "password" text, "date" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP))`);
99
}
1010

1111
public async down(queryRunner: QueryRunner): Promise<void> {

src/services/user.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ export const createUserWithToken = async (userData: any) => {
1717
} else {
1818
const query = {
1919
username,
20-
email: email ? email : "[email protected]",
21-
password: "123",
20+
email,
2221
};
2322
userRepository.save(query).then((u) => {
2423
console.log("u", u);

0 commit comments

Comments
 (0)