From 4694056eef985b53f166ddc81ee4f21846b8df50 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Fri, 9 Feb 2024 13:12:41 -0800 Subject: [PATCH] chore: remove unneccessary async/awaits --- cli/src/services/api.service.ts | 56 ++++++++++++++++----------------- web/package-lock.json | 1 + 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/cli/src/services/api.service.ts b/cli/src/services/api.service.ts index 1c4f24e790332..6829d7b0b5dee 100644 --- a/cli/src/services/api.service.ts +++ b/cli/src/services/api.service.ts @@ -48,59 +48,59 @@ export class ImmichApi { this.options.headers['x-api-key'] = apiKey; } - async addAssetsToAlbum(id: string, bulkIdsDto: BulkIdsDto) { - return await addAssetsToAlbum({ id, bulkIdsDto }, this.options); + addAssetsToAlbum(id: string, bulkIdsDto: BulkIdsDto) { + return addAssetsToAlbum({ id, bulkIdsDto }, this.options); } - async checkBulkUpload(assetBulkUploadCheckDto: AssetBulkUploadCheckDto) { - return await checkBulkUpload({ assetBulkUploadCheckDto }, this.options); + checkBulkUpload(assetBulkUploadCheckDto: AssetBulkUploadCheckDto) { + return checkBulkUpload({ assetBulkUploadCheckDto }, this.options); } - async createAlbum(createAlbumDto: CreateAlbumDto) { - return await createAlbum({ createAlbumDto }, this.options); + createAlbum(createAlbumDto: CreateAlbumDto) { + return createAlbum({ createAlbumDto }, this.options); } - async createApiKey(apiKeyCreateDto: ApiKeyCreateDto, options: { headers: { Authorization: string } }) { - return await createApiKey({ apiKeyCreateDto }, { ...this.options, ...options }); + createApiKey(apiKeyCreateDto: ApiKeyCreateDto, options: { headers: { Authorization: string } }) { + return createApiKey({ apiKeyCreateDto }, { ...this.options, ...options }); } - async getAllAlbums() { - return await getAllAlbums({}, this.options); + getAllAlbums() { + return getAllAlbums({}, this.options); } - async getAllAssets() { - return await getAllAssets({}, this.options); + getAllAssets() { + return getAllAssets({}, this.options); } - async getAssetStatistics() { - return await getAssetStatistics({}, this.options); + getAssetStatistics() { + return getAssetStatistics({}, this.options); } - async getMyUserInfo() { - return await getMyUserInfo(this.options); + getMyUserInfo() { + return getMyUserInfo(this.options); } - async getServerVersion() { - return await getServerVersion(this.options); + getServerVersion() { + return getServerVersion(this.options); } - async getSupportedMediaTypes() { - return await getSupportedMediaTypes(this.options); + getSupportedMediaTypes() { + return getSupportedMediaTypes(this.options); } - async login(loginCredentialDto: LoginCredentialDto) { - return await login({ loginCredentialDto }, this.options); + login(loginCredentialDto: LoginCredentialDto) { + return login({ loginCredentialDto }, this.options); } - async pingServer() { - return await pingServer(this.options); + pingServer() { + return pingServer(this.options); } - async signUpAdmin(signUpDto: SignUpDto) { - return await signUpAdmin({ signUpDto }, this.options); + signUpAdmin(signUpDto: SignUpDto) { + return signUpAdmin({ signUpDto }, this.options); } - async uploadFile(createAssetDto: CreateAssetDto) { - return await uploadFile({ createAssetDto }, this.options); + uploadFile(createAssetDto: CreateAssetDto) { + return uploadFile({ createAssetDto }, this.options); } } diff --git a/web/package-lock.json b/web/package-lock.json index 6bf39e1f29d74..b55e5f8cd7c6f 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -67,6 +67,7 @@ "license": "MIT", "devDependencies": { "@types/node": "^20.11.0", + "oazapfts": "^5.1.4", "typescript": "^5.3.3" }, "peerDependencies": {