Skip to content
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

Closed
wants to merge 8 commits into from
Closed

Add method getAllUsers #88

wants to merge 8 commits into from

Conversation

PahaKoha
Copy link

Feat(entitie, service, presentation, repository): add new get-request which displays a list of all users in the database.

Comment on lines 11 to 13
// import userListService from './service/userListService.js';
// import userListService from './service/userListService.js';
// import userListService from './service/userListService.js';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

src/repository/storage/postgres/orm/sequelize/user.ts Outdated Show resolved Hide resolved
Comment on lines 17 to 25
}, async (request, reply) => {
// const { userId } = request;
const userList = await usersService.getAllUsersById();
if (userList != null) {
return reply.send(userList);
} else {
return reply.send({message: '!'})
}
});
Copy link
Member

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

Comment on lines 15 to 17
fastify.get('/allUsers', {

}, async (request, reply) => {
Copy link
Member

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';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove and lint files 🥺

src/repository/storage/postgres/orm/sequelize/user.ts Outdated Show resolved Hide resolved
src/domain/service/userListService.ts Outdated Show resolved Hide resolved
@neSpecc neSpecc added the should not be merged This change should not be delivered on prod label Oct 22, 2023
@PahaKoha PahaKoha closed this Oct 22, 2023
@PahaKoha PahaKoha deleted the GetAllUsers branch October 27, 2023 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
should not be merged This change should not be delivered on prod
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants