add admin path ทะเบียนประวัติ
This commit is contained in:
parent
a7c1b2e6a9
commit
4bfecf7899
12 changed files with 205 additions and 52 deletions
|
|
@ -55,12 +55,23 @@ export class ProfileCertificateController extends Controller {
|
|||
return new HttpSuccess(record);
|
||||
}
|
||||
|
||||
@Get("admin/history/{certificateId}")
|
||||
public async certificateAdminHistory(@Path() certificateId: string, @Request() req: RequestWithUser) {
|
||||
const _record = await this.certificateRepo.findOneBy({ id: certificateId });
|
||||
if (_record) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
}
|
||||
const record = await this.certificateHistoryRepo.find({
|
||||
where: {
|
||||
profileCertificateId: certificateId,
|
||||
},
|
||||
order: { createdAt: "DESC" },
|
||||
});
|
||||
return new HttpSuccess(record);
|
||||
}
|
||||
|
||||
@Get("history/{certificateId}")
|
||||
public async certificateHistory(@Path() certificateId: string, @Request() req: RequestWithUser) {
|
||||
// const _record = await this.certificateRepo.findOneBy({ id: certificateId });
|
||||
// if (_record) {
|
||||
// await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", _record.profileId);
|
||||
// }
|
||||
public async certificateHistory(@Path() certificateId: string) {
|
||||
const record = await this.certificateHistoryRepo.find({
|
||||
where: {
|
||||
profileCertificateId: certificateId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue