upd: masto api support more types

This commit is contained in:
Mar0xy 2023-09-24 21:45:00 +02:00
parent 487e397810
commit 0758e38237
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
1 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import { Inject, Injectable } from '@nestjs/common';
import megalodon, { Entity, MegalodonInterface } from 'megalodon';
import multipart from '@fastify/multipart';
import { IsNull } from 'typeorm';
import multer from 'fastify-multer';
import type { UsersRepository } from '@/models/_.js';
@ -42,6 +43,13 @@ export class MastodonApiServerService {
fastify.register(multer.contentParser);
fastify.register(multipart, {
limits: {
fileSize: this.config.maxFileSize ?? 262144000,
files: 1,
},
});
fastify.get('/v1/custom_emojis', async (_request, reply) => {
const BASE_URL = `${_request.protocol}://${_request.hostname}`;
const accessTokens = _request.headers.authorization;