fix: file upload and OAuth2 (#10)

This commit is contained in:
Divlo
2022-04-08 21:36:29 +02:00
committed by GitHub
parent 69c567cb66
commit a4c77fec50
30 changed files with 529 additions and 366 deletions

View File

@ -10,7 +10,6 @@ import { memberSchema } from '../../../../../models/Member.js'
import { userPublicWithoutSettingsSchema } from '../../../../../models/User.js'
import { channelSchema } from '../../../../../models/Channel.js'
import { uploadFile } from '../../../../../tools/utils/uploadFile.js'
import { MAXIMUM_FILE_SIZE } from '../../../../../tools/configurations/index.js'
const parametersSchema = Type.Object({
channelId: channelSchema.id
@ -94,8 +93,7 @@ export const postMessageUploadsByChannelIdService: FastifyPluginAsync = async (
const file = await uploadFile({
fastify,
request,
folderInUploadsFolder: 'messages',
maximumFileSize: MAXIMUM_FILE_SIZE
folderInUploadsFolder: 'messages'
})
const message = await prisma.message.create({
data: {