add copyright text to all our files
This commit is contained in:
parent
d27965d8b3
commit
b525c5887f
59 changed files with 293 additions and 33 deletions
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: marie and other Sharkey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { MastoConverters, convertRelationship } from '../converters.js';
|
||||
import { argsToBools, limitToInt } from './timeline.js';
|
||||
import type { MegalodonInterface } from 'megalodon';
|
||||
|
|
@ -104,7 +109,7 @@ export class ApiAccountMastodon {
|
|||
public async getFollowers() {
|
||||
try {
|
||||
const data = await this.client.getAccountFollowers(
|
||||
(this.request.params as any).id,
|
||||
(this.request.params as any).id,
|
||||
limitToInt(this.request.query as any),
|
||||
);
|
||||
return await Promise.all(data.data.map(async (account) => await this.mastoconverter.convertAccount(account)));
|
||||
|
|
@ -118,7 +123,7 @@ export class ApiAccountMastodon {
|
|||
public async getFollowing() {
|
||||
try {
|
||||
const data = await this.client.getAccountFollowing(
|
||||
(this.request.params as any).id,
|
||||
(this.request.params as any).id,
|
||||
limitToInt(this.request.query as any),
|
||||
);
|
||||
return await Promise.all(data.data.map(async (account) => await this.mastoconverter.convertAccount(account)));
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: marie and other Sharkey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import type { MegalodonInterface } from 'megalodon';
|
||||
import type { FastifyRequest } from 'fastify';
|
||||
|
||||
|
|
@ -65,7 +70,7 @@ export async function ApiAuthMastodon(request: FastifyRequest, client: Megalodon
|
|||
client_id: Buffer.from(appData.url || '').toString('base64'),
|
||||
client_secret: appData.clientSecret,
|
||||
};
|
||||
|
||||
|
||||
return returns;
|
||||
} catch (e: any) {
|
||||
console.error(e);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: marie and other Sharkey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { convertFilter } from '../converters.js';
|
||||
import type { MegalodonInterface } from 'megalodon';
|
||||
import type { FastifyRequest } from 'fastify';
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: marie and other Sharkey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { Entity } from 'megalodon';
|
||||
import { FILE_TYPE_BROWSERSAFE } from '@/const.js';
|
||||
import type { Config } from '@/config.js';
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: marie and other Sharkey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { convertNotification } from '../converters.js';
|
||||
import type { MegalodonInterface, Entity } from 'megalodon';
|
||||
import type { FastifyRequest } from 'fastify';
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: marie and other Sharkey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { MastoConverters } from '../converters.js';
|
||||
import { limitToInt } from './timeline.js';
|
||||
import type { MegalodonInterface } from 'megalodon';
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: marie and other Sharkey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import querystring from 'querystring';
|
||||
import { emojiRegexAtStartToEnd } from '@/misc/emoji-regex.js';
|
||||
import { convertAttachment, convertPoll, convertStatusSource, MastoConverters } from '../converters.js';
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: marie and other Sharkey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { ParsedUrlQuery } from 'querystring';
|
||||
import { convertConversation, convertList, MastoConverters } from '../converters.js';
|
||||
import { getClient } from '../MastodonApiServerService.js';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue