mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 04:33:50 +01:00
meow
Co-authored-by: cutls <web-pro@cutls.com>
This commit is contained in:
parent
1d89cc3e3d
commit
9189ef29ba
@ -79,7 +79,7 @@
|
||||
"koa-send": "5.0.1",
|
||||
"koa-slow": "2.1.0",
|
||||
"koa-views": "7.0.2",
|
||||
"@cutls/megalodon": "5.1.15",
|
||||
"@cutls/megalodon": "5.1.16",
|
||||
"mfm-js": "0.23.2",
|
||||
"mime-types": "2.1.35",
|
||||
"multer": "1.4.4-lts.1",
|
||||
|
@ -4,6 +4,23 @@ import { koaBody } from "koa-body";
|
||||
import { getClient } from "../ApiMastodonCompatibleService.js";
|
||||
import { toLimitToInt } from "./timeline.js";
|
||||
|
||||
const relationshopModel = {
|
||||
id: '',
|
||||
following: false,
|
||||
followed_by: false,
|
||||
delivery_following: false,
|
||||
blocking: false,
|
||||
blocked_by: false,
|
||||
muting: false,
|
||||
muting_notifications: false,
|
||||
requested: false,
|
||||
domain_blocking: false,
|
||||
showing_reblogs: false,
|
||||
endorsed: false,
|
||||
notifying: false,
|
||||
note: ''
|
||||
}
|
||||
|
||||
export function apiAccountMastodon(router: Router): void {
|
||||
router.get("/v1/accounts/verify_credentials", async (ctx, next) => {
|
||||
const BASE_URL = `${ctx.protocol}://${ctx.hostname}`;
|
||||
@ -258,6 +275,8 @@ export function apiAccountMastodon(router: Router): void {
|
||||
try {
|
||||
const idsRaw = (ctx.query as any)["id[]"];
|
||||
const ids = typeof idsRaw === "string" ? [idsRaw] : idsRaw;
|
||||
relationshopModel.id = idsRaw || '1'
|
||||
if (!idsRaw) return [relationshopModel]
|
||||
const data = (await client.getRelationships(ids)) as any;
|
||||
ctx.body = data.data;
|
||||
} catch (e: any) {
|
||||
|
@ -57,7 +57,7 @@ importers:
|
||||
'@bull-board/api': ^4.6.4
|
||||
'@bull-board/koa': ^4.6.4
|
||||
'@bull-board/ui': ^4.6.4
|
||||
'@cutls/megalodon': 5.1.15
|
||||
'@cutls/megalodon': 5.1.16
|
||||
'@discordapp/twemoji': 14.0.2
|
||||
'@elastic/elasticsearch': 7.17.0
|
||||
'@koa/cors': 3.4.3
|
||||
@ -223,7 +223,7 @@ importers:
|
||||
'@bull-board/api': 4.10.2
|
||||
'@bull-board/koa': 4.10.2_6tybghmia4wsnt33xeid7y4rby
|
||||
'@bull-board/ui': 4.10.2
|
||||
'@cutls/megalodon': 5.1.15
|
||||
'@cutls/megalodon': 5.1.16
|
||||
'@discordapp/twemoji': 14.0.2
|
||||
'@elastic/elasticsearch': 7.17.0
|
||||
'@koa/cors': 3.4.3
|
||||
@ -847,8 +847,8 @@ packages:
|
||||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.9
|
||||
|
||||
/@cutls/megalodon/5.1.15:
|
||||
resolution: {integrity: sha512-4+mIKUYYr2CLY3idSxXk56WSTG9ww3opeenmsPRxftTwcjQTYxGntNkWmJWEbzeJ4rPslnvpwD7cFR62bPf41g==}
|
||||
/@cutls/megalodon/5.1.16:
|
||||
resolution: {integrity: sha512-s2U3qjcs86v0/p0EPwlQqSMh4UhAqTNxu8xUVsPvzrwXr5TrrJ5AVKunBm5582AEkx47nZkqm/98ZF2iHb0GtQ==}
|
||||
engines: {node: '>=15.0.0'}
|
||||
dependencies:
|
||||
'@types/oauth': 0.9.1
|
||||
|
Loading…
Reference in New Issue
Block a user