fix backend lint errors
This commit is contained in:
parent
9dffb13be7
commit
f9c1535147
13 changed files with 27 additions and 23 deletions
|
|
@ -100,7 +100,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
id: string;
|
||||
note: {
|
||||
text?: string;
|
||||
cw?: string|null;
|
||||
cw?: string | null;
|
||||
fileIds: string[];
|
||||
visibility: typeof noteVisibilities[number];
|
||||
visibleUsers: Packed<'UserLite'>[];
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ export class MastodonApiServerService {
|
|||
reply.send(response);
|
||||
});
|
||||
|
||||
fastify.post<{ Body: { description?: string; focus?: string }}>('/v2/media', { preHandler: upload.single('file') }, async (_request, reply) => {
|
||||
fastify.post<{ Body: { description?: string; focus?: string } }>('/v2/media', { preHandler: upload.single('file') }, async (_request, reply) => {
|
||||
const multipartData = await _request.file();
|
||||
if (!multipartData) {
|
||||
reply.code(401).send({ error: 'No image' });
|
||||
|
|
@ -284,7 +284,7 @@ export class MastodonApiServerService {
|
|||
reply.send(response);
|
||||
});
|
||||
|
||||
fastify.get<{ Querystring: { limit?: string }}>('/v1/follow_requests', async (_request, reply) => {
|
||||
fastify.get<{ Querystring: { limit?: string } }>('/v1/follow_requests', async (_request, reply) => {
|
||||
const client = this.clientService.getClient(_request);
|
||||
|
||||
const limit = _request.query.limit ? parseInt(_request.query.limit) : 20;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ export class ApiAccountMastodon {
|
|||
reply.send(response);
|
||||
});
|
||||
|
||||
fastify.get<{ Querystring: { acct?: string }}>('/v1/accounts/lookup', async (_request, reply) => {
|
||||
fastify.get<{ Querystring: { acct?: string } }>('/v1/accounts/lookup', async (_request, reply) => {
|
||||
if (!_request.query.acct) return reply.code(400).send({ error: 'BAD_REQUEST', error_description: 'Missing required property "acct"' });
|
||||
|
||||
const client = this.clientService.getClient(_request);
|
||||
|
|
@ -154,7 +154,7 @@ export class ApiAccountMastodon {
|
|||
reply.send(response);
|
||||
});
|
||||
|
||||
fastify.get<ApiAccountMastodonRoute & { Querystring: { id?: string | string[] }}>('/v1/accounts/relationships', async (_request, reply) => {
|
||||
fastify.get<ApiAccountMastodonRoute & { Querystring: { id?: string | string[] } }>('/v1/accounts/relationships', async (_request, reply) => {
|
||||
if (!_request.query.id) return reply.code(400).send({ error: 'BAD_REQUEST', error_description: 'Missing required property "id"' });
|
||||
|
||||
const client = this.clientService.getClient(_request);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue