Merge branch 'develop' into adiDev
This commit is contained in:
commit
0df3191fcc
10 changed files with 126 additions and 37 deletions
|
|
@ -42,13 +42,16 @@ export class ProfileAvatarController extends Controller {
|
|||
Object.assign(data, { ...body, ...meta });
|
||||
|
||||
await this.avatarRepository.save(data);
|
||||
let avatar = `ทะเบียนประวัติ/โปรไฟล์/${profile.id}/profile-${data.id}`;
|
||||
let avatar = `ทะเบียนประวัติ/โปรไฟล์/${profile.id}`;
|
||||
let fileName = `profile-${data.id}`;
|
||||
data.avatar = avatar;
|
||||
data.avatarName = fileName;
|
||||
await this.avatarRepository.save(data);
|
||||
profile.avatar = avatar;
|
||||
profile.avatarName = fileName;
|
||||
await this.profileRepository.save(profile);
|
||||
|
||||
return new HttpSuccess(avatar);
|
||||
return new HttpSuccess({ avatar: avatar, avatarName: fileName });
|
||||
}
|
||||
|
||||
@Delete("{avatarId}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue