fix: file upload and OAuth2 (#10)
This commit is contained in:
@ -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: {
|
||||
|
Reference in New Issue
Block a user