upd: megalodon to v7

This commit is contained in:
Mar0xy 2023-09-24 01:44:53 +02:00
parent b4674ce65c
commit afda15260f
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
234 changed files with 21334 additions and 7675 deletions

View file

@ -20,7 +20,7 @@ export function getClient(BASE_URL: string, authorization: string | undefined):
const accessTokenArr = authorization?.split(" ") ?? [null];
const accessToken = accessTokenArr[accessTokenArr.length - 1];
const generator = (megalodon as any).default;
const client = generator(BASE_URL, accessToken) as MegalodonInterface;
const client = generator('misskey', BASE_URL, accessToken) as MegalodonInterface;
return client;
}
@ -303,7 +303,7 @@ export class MastodonApiServerService {
const accessTokens = _request.headers.authorization;
const client = getClient(BASE_URL, accessTokens);
try {
const data = await client.getAccountFeaturedTags(convertId(_request.params.id, IdType.SharkeyId));
const data = await client.getFeaturedTags();
reply.send(data.data.map((tag) => convertFeaturedTag(tag)));
} catch (e: any) {
console.error(e);