path รูป

This commit is contained in:
Kittapath 2024-05-14 15:43:24 +07:00
parent 3429fa29a2
commit 566b4db692
2 changed files with 12 additions and 2 deletions

View file

@ -42,6 +42,11 @@ export class ProfileAvatarController extends Controller {
Object.assign(data, { ...body, ...meta });
await this.avatarRepository.save(data);
let avatar = `ทะเบียนประวัติ/โปรไฟล์/${profile.id}/profile-${data.id}`;
data.avatar = avatar;
await this.avatarRepository.save(data);
profile.avatar = avatar;
await this.profileRepository.save(profile);
return new HttpSuccess();
}