mirror of
https://github.com/ThisIsBenny/wishlist-app.git
synced 2025-06-07 05:57:41 +00:00
small adjustment
Signed-off-by: Benny Samir Hierl <bennysamir@posteo.de>
This commit is contained in:
parent
5626fabdce
commit
520ddfe653
1 changed files with 1 additions and 8 deletions
|
@ -4,13 +4,6 @@ import { wishlist } from '../../models'
|
|||
import { prisma } from '../../services'
|
||||
import { uniqueKeyError } from '../../config/errors'
|
||||
|
||||
interface GetBySlugUrlTextRequest extends FastifyRequest {
|
||||
params: {
|
||||
wishlistId: string
|
||||
itemId: number
|
||||
}
|
||||
}
|
||||
|
||||
export const createList = <RouteOptions>{
|
||||
method: 'POST',
|
||||
url: '/',
|
||||
|
@ -46,7 +39,7 @@ export const createList = <RouteOptions>{
|
|||
request.log.error(error)
|
||||
reply.send(new Error('Unexptected Error'))
|
||||
},
|
||||
handler: async (request: GetBySlugUrlTextRequest, reply: FastifyReply) => {
|
||||
handler: async (request: FastifyRequest, reply: FastifyReply) => {
|
||||
request.log.debug(request.body)
|
||||
const item = await wishlist.create(request.body as Wishlist)
|
||||
reply.code(201).send(item)
|
||||
|
|
Loading…
Add table
Reference in a new issue