fix: request body
This commit is contained in:
parent
a0887d8b74
commit
808971b5b2
2 changed files with 4 additions and 8 deletions
|
|
@ -56,10 +56,7 @@ export class ProfileGovernmentHistoryController extends Controller {
|
|||
}
|
||||
|
||||
@Post()
|
||||
public async newFamilyHistory(
|
||||
@Request() req: RequestWithUser,
|
||||
@Body() body: CreateProfileGovernment,
|
||||
) {
|
||||
public async newGov(@Request() req: RequestWithUser, @Body() body: CreateProfileGovernment) {
|
||||
if (!body.profileId) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "กรุณากรอก profileId");
|
||||
}
|
||||
|
|
@ -87,7 +84,7 @@ export class ProfileGovernmentHistoryController extends Controller {
|
|||
}
|
||||
|
||||
@Patch("{profileId}")
|
||||
public async editFamilyHistory(
|
||||
public async editGov(
|
||||
@Request() req: RequestWithUser,
|
||||
@Body() body: UpdateProfileGovernment,
|
||||
@Path() profileId: string,
|
||||
|
|
@ -114,7 +111,7 @@ export class ProfileGovernmentHistoryController extends Controller {
|
|||
}
|
||||
|
||||
@Delete("{profileId}")
|
||||
public async deleteGovHistory(@Path() profileId: string) {
|
||||
public async deleteGov(@Path() profileId: string) {
|
||||
const result = await this.govRepo.delete({ profileId: profileId });
|
||||
|
||||
if (result.affected && result.affected <= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue