ปรับโครงสร้าง root

This commit is contained in:
Kittapath 2024-06-20 11:58:51 +07:00
parent 9de005c7ae
commit 7f21756928
5 changed files with 143 additions and 60 deletions

View file

@ -4466,4 +4466,21 @@ export class ProfileController extends Controller {
return new HttpSuccess({ data: mapDataProfile, total });
}
/**
*
* @summary (ADMIN)
*
*/
@Get("probation/{id}")
async getProbationProfile(@Path() id: string) {
const profile = await this.profileRepo.findOne({
where: { id },
});
if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
profile.isProbation = true;
await this.profileRepo.save(profile);
return new HttpSuccess(profile);
}
}