ปรับโครงสร้าง root
This commit is contained in:
parent
9de005c7ae
commit
7f21756928
5 changed files with 143 additions and 60 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue