From 8337a926378c39f618ea9ec93a27455e33dde45f Mon Sep 17 00:00:00 2001 From: Kittapath Date: Tue, 11 Jun 2024 16:36:18 +0700 Subject: [PATCH 1/2] migrate --- ...8098502267-update_table_Profileemp_add_role2.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/migration/1718098502267-update_table_Profileemp_add_role2.ts diff --git a/src/migration/1718098502267-update_table_Profileemp_add_role2.ts b/src/migration/1718098502267-update_table_Profileemp_add_role2.ts new file mode 100644 index 00000000..07289e9b --- /dev/null +++ b/src/migration/1718098502267-update_table_Profileemp_add_role2.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableProfileempAddRole21718098502267 implements MigrationInterface { + name = 'UpdateTableProfileempAddRole21718098502267' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`changePosition\` ADD \`status\` text NULL COMMENT 'สถานะ'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`changePosition\` DROP COLUMN \`status\``); + } + +} From 72e746a0c20b91fc5726606aeaab5a5b49661d6d Mon Sep 17 00:00:00 2001 From: Kittapath Date: Tue, 11 Jun 2024 16:53:29 +0700 Subject: [PATCH 2/2] no message --- src/controllers/ProfileAvatarController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/ProfileAvatarController.ts b/src/controllers/ProfileAvatarController.ts index c79e1821..0c194ed8 100644 --- a/src/controllers/ProfileAvatarController.ts +++ b/src/controllers/ProfileAvatarController.ts @@ -25,7 +25,7 @@ export class ProfileAvatarController extends Controller { @Get("profileId/{id}") async getProfile(@Path() id: string) { const profile = await this.profileRepository.findOne({ - select: ["avatar", "avatarName"], + select: ["id", "avatar", "avatarName"], where: { id }, });