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,7 +1,7 @@
import { application } from '../../../../application.js'
import { authenticateUserTest } from '../../../../__test__/utils/authenticateUserTest.js'
import { prismaMock } from '../../../../__test__/setup.js'
import { memberExample } from '../../../../models/Member'
import { memberExample } from '../../../../models/Member.js'
import { channelExample } from '../../../../models/Channel.js'
describe('GET /channels/[channelId]', () => {

View File

@ -44,7 +44,6 @@ const postServiceSchema: FastifySchema = {
401: fastifyErrors[401],
403: fastifyErrors[403],
404: fastifyErrors[404],
431: fastifyErrors[431],
500: fastifyErrors[500]
}
} as const

View File

@ -42,6 +42,7 @@ const postServiceSchema: FastifySchema = {
401: fastifyErrors[401],
403: fastifyErrors[403],
404: fastifyErrors[404],
431: fastifyErrors[431],
500: fastifyErrors[500]
}
} as const