Skip to content

Commit

Permalink
fix: we will need the project id in the front end
Browse files Browse the repository at this point in the history
  • Loading branch information
MatheusSanchez committed Jan 30, 2024
1 parent 5c64293 commit 038f138
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/controller/project/createProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ export async function createProject(
userRepository,
)
try {
await createProjectUseCase.execute({
const project = await createProjectUseCase.execute({
userId,
title,
tags,
link,
description,
})

return response.status(201).send({ project })
} catch (error) {
if (error instanceof ResourceNotFoundError) {
return response.status(404).send({ message: error.message })
return response.status(404).send({ message: 'User was not Found !' })
}

throw error
}

return response.status(201).send()
}

0 comments on commit 038f138

Please sign in to comment.