From 98389114a8cba8c41f861bf7f8036827069042bf Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Tue, 31 Oct 2023 11:46:08 +0100 Subject: [PATCH] fix: suggestions --- packages/backend/src/server/api/mastodon/endpoints/search.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/search.ts b/packages/backend/src/server/api/mastodon/endpoints/search.ts index 2087d13ad..432a1f144 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/search.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/search.ts @@ -74,8 +74,8 @@ export class ApiSearchMastodon { 'Accept': 'application/json', 'Content-Type': 'application/json', }, - body: JSON.stringify({ i: this.request.headers.authorization?.replace('Bearer ', ''), limit: (this.request.query as any).limit || 20, origin: 'local', sort: '+follower', state: 'alive' }), - }).then((res) => res.json()).then((data) => data.map(((entry: any) => { return { source: 'global', account: entry }; }))); + body: JSON.stringify({ limit: (this.request.query as any).limit || 20, origin: 'local', sort: '+follower', state: 'alive' }), + }).then((res) => res.json()).then(data => data.map(((entry: any) => { return { source: 'global', account: entry }; }))); return Promise.all(data.map(async (suggestion: any) => { suggestion.account = await this.mastoConverter.convertAccount(suggestion.account); return suggestion; })); } catch (e: any) { console.error(e);