fix: schemaValidationMessages errors in Swagger docs

This commit is contained in:
Divlo
2022-10-04 14:59:14 +02:00
parent 8ac1696ca0
commit b985172cd0
73 changed files with 1467 additions and 1182 deletions

View File

@ -1,4 +1,4 @@
import { FastifyPluginAsync, FastifySchema } from 'fastify'
import type { FastifyPluginAsync, FastifySchema } from 'fastify'
import prisma from '../../../tools/database/prisma.js'
import { fastifyErrors } from '../../../models/utils.js'

View File

@ -1,5 +1,5 @@
import { Type } from '@sinclair/typebox'
import { FastifyPluginAsync, FastifySchema } from 'fastify'
import type { FastifyPluginAsync, FastifySchema } from 'fastify'
import fastifyMultipart from '@fastify/multipart'
import authenticateUser from '../../../../tools/plugins/authenticateUser.js'

View File

@ -1,7 +1,8 @@
import { randomUUID } from 'node:crypto'
import { Static, Type } from '@sinclair/typebox'
import { FastifyPluginAsync, FastifySchema } from 'fastify'
import type { Static } from '@sinclair/typebox'
import { Type } from '@sinclair/typebox'
import type { FastifyPluginAsync, FastifySchema } from 'fastify'
import prisma from '../../../tools/database/prisma.js'
import { fastifyErrors } from '../../../models/utils.js'
@ -9,7 +10,7 @@ import authenticateUser from '../../../tools/plugins/authenticateUser.js'
import { userCurrentSchema, userSchema } from '../../../models/User.js'
import { sendEmail } from '../../../tools/email/sendEmail.js'
import { API_URL } from '../../../tools/configurations/index.js'
import { Language, Theme } from '../../../models/UserSettings.js'
import type { Language, Theme } from '../../../models/UserSettings.js'
import { parseStringNullish } from '../../../tools/utils/parseStringNullish.js'
const bodyPutServiceSchema = Type.Object({
@ -136,7 +137,9 @@ export const putCurrentUser: FastifyPluginAsync = async (fastify) => {
})
await fastify.io.emitToAuthorizedUsers({
event: 'users',
isAuthorizedCallback: () => true,
isAuthorizedCallback: () => {
return true
},
payload: {
action: 'update',
item: user

View File

@ -1,5 +1,6 @@
import { Static, Type } from '@sinclair/typebox'
import { FastifyPluginAsync, FastifySchema } from 'fastify'
import type { Static } from '@sinclair/typebox'
import { Type } from '@sinclair/typebox'
import type { FastifyPluginAsync, FastifySchema } from 'fastify'
import prisma from '../../../../tools/database/prisma.js'
import { fastifyErrors } from '../../../../models/utils.js'