Skip to content

Commit

Permalink
routes update after the merger
Browse files Browse the repository at this point in the history
  • Loading branch information
maxyuri13 committed Feb 3, 2024
1 parent 7609eb4 commit 1374c7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/controller/project/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import fastifyStatic from '@fastify/static'
import { getProjectsByTags } from './getProjectsByTags'
import { editProject } from './editProjectById'
import { deleteProjectById } from './deleteProjectById'
import getProjectByUserIdSchema from './swagger/getProjectsByUserIdSwagger.json'
import getProjectByIdSchema from './swagger/getProjectByIDSwagger.json'
import createProjectSwagger from './swagger/createProjectSwagger.json'

export async function projectRoutes(app: FastifyInstance) {
app.register(FastifyMultipart, {
Expand Down
6 changes: 4 additions & 2 deletions src/controller/user/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { registerUser } from './registerUser'
import { editUserById } from './editUserById'
import { addImageUser } from './addImageToUser'
import FastifyMultipart from '@fastify/multipart'
import getUserByIdSchema from './Swagger/getUserByIdSchema.json'
import registerUserSchema from './Swagger/registerUserSchema.json'

export async function userRoutes(app: FastifyInstance) {
app.register(FastifyMultipart, {
Expand All @@ -13,8 +15,8 @@ export async function userRoutes(app: FastifyInstance) {
fileSize: 1000000, // the max file size in bytes
},
})
app.post('/user', registerUser)
app.get('/user/:id', getUserById)
app.post('/user', registerUserSchema, registerUser)
app.get('/user/:id', getUserByIdSchema, getUserById)
app.get('/user', getUserByEmail)
app.put('/user/:userId/edit', editUserById)
app.post('/user/:userId/photo', addImageUser)
Expand Down

0 comments on commit 1374c7d

Please sign in to comment.