fix(services): restrict GET /uploads/messages/:file to authorized users

This commit is contained in:
Divlo
2022-01-06 18:13:13 +01:00
parent 03946f26e7
commit 97b1d04261
23 changed files with 1314 additions and 2534 deletions

View File

@ -1,8 +1,8 @@
import { application } from '../../../../../application.js'
import { authenticateUserTest } from '../../../../../__test__/utils/authenticateUserTest.js'
import { prismaMock } from '../../../../../__test__/setup.js'
import { memberExample } from '../../../../../models/Member'
import { guildExample } from '../../../../../models/Guild'
import { memberExample } from '../../../../../models/Member.js'
import { guildExample } from '../../../../../models/Guild.js'
import { channelExample } from '../../../../../models/Channel.js'
describe('GET /guilds/[guildId]/channels', () => {

View File

@ -1,9 +1,9 @@
import { Static, Type } from '@sinclair/typebox'
import { FastifyPluginAsync, FastifySchema } from 'fastify'
import fastifyMultipart from 'fastify-multipart'
import authenticateUser from '../../../../tools/plugins/authenticateUser.js'
import { fastifyErrors } from '../../../../models/utils.js'
import fastifyMultipart from 'fastify-multipart'
import prisma from '../../../../tools/database/prisma.js'
import { uploadFile } from '../../../../tools/utils/uploadFile.js'
import { guildSchema } from '../../../../models/Guild.js'