From be7d3859c3629dffb8e3d4a421978f67ddc3c02b Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Mon, 30 Oct 2023 00:45:38 +0100 Subject: [PATCH] test: update debug lines --- .../src/server/api/mastodon/MastodonApiServerService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/mastodon/MastodonApiServerService.ts b/packages/backend/src/server/api/mastodon/MastodonApiServerService.ts index 06aaebf032..ac66d8d49b 100644 --- a/packages/backend/src/server/api/mastodon/MastodonApiServerService.ts +++ b/packages/backend/src/server/api/mastodon/MastodonApiServerService.ts @@ -258,8 +258,9 @@ export class MastodonApiServerService { try { if (_request.files.length > 0 && accessTokens) { const tokeninfo = await this.accessTokensRepository.findOneBy({ token: accessTokens.replace('Bearer ', '') }); - console.error(tokeninfo); + console.error(_request.files); if (tokeninfo && (_request.files as any)['avatar']) { + console.error('avatar'); const file = toSingleLast((_request.files as any)['avatar']); const upload = await this.driveService.addFile({ user: { id: tokeninfo.userId, host: null }, @@ -267,6 +268,7 @@ export class MastodonApiServerService { name: file.originalname !== null && file.originalname !== 'file' ? file.originalname : undefined, sensitive: false, }); + console.error(upload); if (upload.type.startsWith('image/')) { (_request.body as any).avatar = upload.id; }