refactor: update getRoomRecordUrl method in MinioService for improved promise handling
- Changed the implementation of the `getRoomRecordUrl` method to use `await` with the Promise constructor for better readability and consistency. - This adjustment enhances the asynchronous handling of the method, ensuring a more straightforward promise resolution process.
This commit is contained in:
@@ -139,7 +139,7 @@ export class MinioService {
|
||||
}
|
||||
// get the record url from minio by searching for the file starting with roomId and ending with .mp4 and returning the presigned url
|
||||
async getRoomRecordUrl(roomId: string) {
|
||||
return new Promise<string | null>(async (resolve, reject) => {
|
||||
return await new Promise<string | null>(async (resolve, reject) => {
|
||||
const stream = this.minioClient.listObjects(this.configService.get('BUCKET_NAME') ?? 'epess', `records/${roomId}`, true)
|
||||
const items: BucketItem[] = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user