แก้ วันที่ update
This commit is contained in:
parent
6d36c9b05f
commit
218886b3f4
83 changed files with 1671 additions and 3483 deletions
|
|
@ -22,6 +22,7 @@ export class ProfileAvatarEmployeeTempController extends Controller {
|
|||
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||
const lists = await this.avatarRepository.find({
|
||||
where: { profileEmployeeId },
|
||||
order: { createdAt: "ASC" },
|
||||
});
|
||||
return new HttpSuccess(lists);
|
||||
}
|
||||
|
|
@ -30,7 +31,6 @@ export class ProfileAvatarEmployeeTempController extends Controller {
|
|||
async getProfile(@Path() id: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||
const profile = await this.profileRepository.findOne({
|
||||
select: ["id", "avatar", "avatarName"],
|
||||
where: { id },
|
||||
});
|
||||
|
||||
|
|
@ -42,7 +42,6 @@ export class ProfileAvatarEmployeeTempController extends Controller {
|
|||
@Get("profileEmployeeId-admin/{id}")
|
||||
async getProfileAdmin(@Path() id: string) {
|
||||
const profile = await this.profileRepository.findOne({
|
||||
select: ["id", "avatar", "avatarName"],
|
||||
where: { id },
|
||||
});
|
||||
|
||||
|
|
@ -57,7 +56,7 @@ export class ProfileAvatarEmployeeTempController extends Controller {
|
|||
@Path() id: string,
|
||||
@Request() req: RequestWithUser,
|
||||
) {
|
||||
// await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP"); //ไม่แน่ใจTEMPปิดไว้ก่อน
|
||||
await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");
|
||||
const result = await this.avatarRepository.findOneBy({ id: id });
|
||||
if (!result) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
|
|
@ -104,6 +103,8 @@ export class ProfileAvatarEmployeeTempController extends Controller {
|
|||
createdFullName: req.user.name,
|
||||
lastUpdateUserId: req.user.sub,
|
||||
lastUpdateFullName: req.user.name,
|
||||
createdAt: new Date(),
|
||||
lastUpdatedAt: new Date(),
|
||||
};
|
||||
|
||||
Object.assign(data, { ...body, ...meta });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue