add admin path ทะเบียนประวัติ
This commit is contained in:
parent
a7c1b2e6a9
commit
4bfecf7899
12 changed files with 205 additions and 52 deletions
|
|
@ -73,8 +73,8 @@ export class ProfileHonorController extends Controller {
|
|||
return new HttpSuccess(record);
|
||||
}
|
||||
|
||||
@Get("history/{honorId}")
|
||||
public async honorHistory(@Path() honorId: string, @Request() req: RequestWithUser) {
|
||||
@Get("admin/history/{honorId}")
|
||||
public async honorAdminHistory(@Path() honorId: string, @Request() req: RequestWithUser) {
|
||||
const _record = await this.honorRepo.findOneBy({ id: honorId });
|
||||
if (_record) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
|
|
@ -88,6 +88,17 @@ export class ProfileHonorController extends Controller {
|
|||
return new HttpSuccess(record);
|
||||
}
|
||||
|
||||
@Get("history/{honorId}")
|
||||
public async honorHistory(@Path() honorId: string, @Request() req: RequestWithUser) {
|
||||
const record = await this.honorHistoryRepo.find({
|
||||
where: {
|
||||
profileHonorId: honorId,
|
||||
},
|
||||
order: { createdAt: "DESC" },
|
||||
});
|
||||
return new HttpSuccess(record);
|
||||
}
|
||||
|
||||
@Post()
|
||||
public async newHonor(@Request() req: RequestWithUser, @Body() body: CreateProfileHonor) {
|
||||
if (!body.profileId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue