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 }, }); 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\``); + } + +}