ibywaks / cookbook

A simple Express Node.js recipe API using Sequelize ORM
103 stars 54 forks source link

input or dto ? #4

Open pvasquez1992 opened 2 years ago

pvasquez1992 commented 2 years ago

hi! , i have a issue with the inputDTO and Input ..

for example

export const create = async (payload: IngredientInput): Promise => { i

on service method create we have a IngredientInput but in the controller we send a CreateIngredientDTO

export const create = async(payload: CreateIngredientDTO): Promise => { return mapper.toIngredient(await service.create(payload)) }

how can i resolve this issue, we have a problem to casting.

please help me

pvasquez1992 commented 2 years ago

sorry i have a problem..