fix: backward compat
This commit is contained in:
parent
34f574646b
commit
015c119d3f
1 changed files with 11 additions and 1 deletions
|
|
@ -856,7 +856,17 @@ export class UserAttachmentController extends Controller {
|
|||
throw new HttpError(HttpStatus.NOT_FOUND, "User cannot be found.", "userNotFound");
|
||||
}
|
||||
|
||||
return await listFile(fileLocation.user.attachment(userId));
|
||||
const list = await listFile(fileLocation.user.attachment(userId));
|
||||
return await Promise.all(
|
||||
list.map(async (v) => ({
|
||||
name: v,
|
||||
url: await minio.presignedGetObject(
|
||||
MINIO_BUCKET,
|
||||
fileLocation.user.attachment(userId, v),
|
||||
12 * 60 * 60,
|
||||
),
|
||||
})),
|
||||
);
|
||||
}
|
||||
|
||||
@Post()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue