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