mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-26 15:43:02 +00:00
fix: suggestions
This commit is contained in:
parent
171ba6f4f5
commit
98389114a8
1 changed files with 2 additions and 2 deletions
|
@ -74,8 +74,8 @@ export class ApiSearchMastodon {
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
'Content-Type': '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' }),
|
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 }; })));
|
}).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; }));
|
return Promise.all(data.map(async (suggestion: any) => { suggestion.account = await this.mastoConverter.convertAccount(suggestion.account); return suggestion; }));
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
Loading…
Reference in a new issue