-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add method getAllUsers #88
Conversation
src/domain/index.ts
Outdated
// import userListService from './service/userListService.js'; | ||
// import userListService from './service/userListService.js'; | ||
// import userListService from './service/userListService.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
}, async (request, reply) => { | ||
// const { userId } = request; | ||
const userList = await usersService.getAllUsersById(); | ||
if (userList != null) { | ||
return reply.send(userList); | ||
} else { | ||
return reply.send({message: '!'}) | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment and remove else
fastify.get('/allUsers', { | ||
|
||
}, async (request, reply) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add response schema
@@ -0,0 +1,24 @@ | |||
import User from '@domain/entities/user'; | |||
// import type User from '@domain/entities/user'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove and lint files 🥺
Feat(entitie, service, presentation, repository): add new get-request which displays a list of all users in the database.