fix: missing field input
This commit is contained in:
parent
ad26a551f0
commit
f911384242
1 changed files with 6 additions and 12 deletions
|
|
@ -85,6 +85,8 @@ type UserCreate = {
|
|||
districtId?: string | null;
|
||||
provinceId?: string | null;
|
||||
|
||||
selectedImage?: string;
|
||||
|
||||
branchId: string | string[];
|
||||
};
|
||||
|
||||
|
|
@ -126,6 +128,8 @@ type UserUpdate = {
|
|||
email?: string;
|
||||
telephoneNo?: string;
|
||||
|
||||
selectedImage?: string;
|
||||
|
||||
subDistrictId?: string | null;
|
||||
districtId?: string | null;
|
||||
provinceId?: string | null;
|
||||
|
|
@ -284,17 +288,7 @@ export class UserController extends Controller {
|
|||
]);
|
||||
|
||||
return {
|
||||
result: await Promise.all(
|
||||
result.map(async (v) => ({
|
||||
...v,
|
||||
branch: includeBranch ? v.branch.map((a) => a.branch) : undefined,
|
||||
profileImageUrl: await presignedGetObjectIfExist(
|
||||
MINIO_BUCKET,
|
||||
imageLocation(v.id),
|
||||
12 * 60 * 60,
|
||||
),
|
||||
})),
|
||||
),
|
||||
result,
|
||||
page,
|
||||
pageSize,
|
||||
total,
|
||||
|
|
@ -841,7 +835,7 @@ export class UserProfileController extends Controller {
|
|||
}
|
||||
|
||||
@Delete("{name}")
|
||||
async deleteAttachment(@Path() userId: string, @Path() name: string) {
|
||||
async deleteImage(@Path() userId: string, @Path() name: string) {
|
||||
await minio.removeObject(MINIO_BUCKET, fileLocation.user.profile(userId, name), {
|
||||
forceDelete: true,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue