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;
|
districtId?: string | null;
|
||||||
provinceId?: string | null;
|
provinceId?: string | null;
|
||||||
|
|
||||||
|
selectedImage?: string;
|
||||||
|
|
||||||
branchId: string | string[];
|
branchId: string | string[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -126,6 +128,8 @@ type UserUpdate = {
|
||||||
email?: string;
|
email?: string;
|
||||||
telephoneNo?: string;
|
telephoneNo?: string;
|
||||||
|
|
||||||
|
selectedImage?: string;
|
||||||
|
|
||||||
subDistrictId?: string | null;
|
subDistrictId?: string | null;
|
||||||
districtId?: string | null;
|
districtId?: string | null;
|
||||||
provinceId?: string | null;
|
provinceId?: string | null;
|
||||||
|
|
@ -284,17 +288,7 @@ export class UserController extends Controller {
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
result: await Promise.all(
|
result,
|
||||||
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,
|
|
||||||
),
|
|
||||||
})),
|
|
||||||
),
|
|
||||||
page,
|
page,
|
||||||
pageSize,
|
pageSize,
|
||||||
total,
|
total,
|
||||||
|
|
@ -841,7 +835,7 @@ export class UserProfileController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete("{name}")
|
@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), {
|
await minio.removeObject(MINIO_BUCKET, fileLocation.user.profile(userId, name), {
|
||||||
forceDelete: true,
|
forceDelete: true,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue