diff --git a/apps/frontend/src/pages/settings/applications.vue b/apps/frontend/src/pages/settings/applications.vue index bfb1e5db0..1fb9c6950 100644 --- a/apps/frontend/src/pages/settings/applications.vue +++ b/apps/frontend/src/pages/settings/applications.vue @@ -549,7 +549,7 @@ async function onImageSelection(files) { const file = files[0] const extFromType = file.type.split('/')[1] - await client.labrinth.oauth_internal.uploadAppIcon(editingId.value, file, extFromType).promise + await client.labrinth.oauth_internal.uploadAppIcon(editingId.value, file, extFromType) await refresh() diff --git a/packages/api-client/src/modules/labrinth/oauth/internal.ts b/packages/api-client/src/modules/labrinth/oauth/internal.ts index 680009e05..004fe26df 100644 --- a/packages/api-client/src/modules/labrinth/oauth/internal.ts +++ b/packages/api-client/src/modules/labrinth/oauth/internal.ts @@ -1,5 +1,4 @@ import { AbstractModule } from '../../../core/abstract-module' -import type { UploadHandle } from '../../../types/upload' import type { Labrinth } from '../types' export class LabrinthOAuthInternalModule extends AbstractModule { @@ -110,14 +109,14 @@ export class LabrinthOAuthInternalModule extends AbstractModule { * @param id - The OAuth client ID * @param file - The icon file * @param ext - The file extension (e.g. 'png', 'jpeg') - * @returns UploadHandle for progress tracking and cancellation */ - public uploadAppIcon(id: string, file: File | Blob, ext: string): UploadHandle { - return this.client.upload(`/oauth/app/${id}/icon`, { + public async uploadAppIcon(id: string, file: File | Blob, ext: string): Promise { + return this.client.request(`/oauth/app/${id}/icon`, { api: 'labrinth', version: 'internal', - file, + method: 'PATCH', params: { ext }, + body: file, }) }