upd: masto api support more types
This commit is contained in:
parent
487e397810
commit
0758e38237
|
@ -1,5 +1,6 @@
|
||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
import megalodon, { Entity, MegalodonInterface } from 'megalodon';
|
import megalodon, { Entity, MegalodonInterface } from 'megalodon';
|
||||||
|
import multipart from '@fastify/multipart';
|
||||||
import { IsNull } from 'typeorm';
|
import { IsNull } from 'typeorm';
|
||||||
import multer from 'fastify-multer';
|
import multer from 'fastify-multer';
|
||||||
import type { UsersRepository } from '@/models/_.js';
|
import type { UsersRepository } from '@/models/_.js';
|
||||||
|
@ -42,6 +43,13 @@ export class MastodonApiServerService {
|
||||||
|
|
||||||
fastify.register(multer.contentParser);
|
fastify.register(multer.contentParser);
|
||||||
|
|
||||||
|
fastify.register(multipart, {
|
||||||
|
limits: {
|
||||||
|
fileSize: this.config.maxFileSize ?? 262144000,
|
||||||
|
files: 1,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
fastify.get('/v1/custom_emojis', async (_request, reply) => {
|
fastify.get('/v1/custom_emojis', async (_request, reply) => {
|
||||||
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
|
||||||
const accessTokens = _request.headers.authorization;
|
const accessTokens = _request.headers.authorization;
|
||||||
|
|
Loading…
Reference in New Issue