Skip to content

Commit

Permalink
Fixed code style
Browse files Browse the repository at this point in the history
  • Loading branch information
PahaKoha committed Oct 22, 2023
1 parent e6549bc commit e5fbbbf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/domain/service/userListService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export default class UserListService {
*
* @returns { Promise<UserList> } user
*/
public async getAllUsers(): Promise<UserList> {
public async getUserList(): Promise<UserList> {
return {
users: await this.repository.getAllUsers(),
users: await this.repository.getUserList(),
};
}
}
2 changes: 1 addition & 1 deletion src/presentation/http/router/userList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const AllUsersRouter: FastifyPluginCallback<UsersRouterOptions> = (fastify, opts
fastify.get('/allUsers', {

}, async (_, reply) => {
const userList = await usersService.getAllUsers();
const userList = await usersService.getUserList();

return reply.send(userList);
});
Expand Down
3 changes: 1 addition & 2 deletions src/repository/storage/postgres/orm/sequelize/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Model, DataTypes } from 'sequelize';
import type Orm from '@repository/storage/postgres/orm/sequelize/index.js';
import type User from '@domain/entities/user.js';
import type { UserEditorTool } from '@domain/entities/userExtensions.js';
import { UserList } from '@domain/entities/userList';

/**
* Query options for getting user
Expand Down Expand Up @@ -288,7 +287,7 @@ export default class UserSequelizeStorage {
* Get list users
* @returns { Promise<UserList> } - found all users
*/
public async getAllUsers(): Promise<User[]> {
public async getUserList(): Promise<User[]> {
const userList = await this.model.findAll({ });

return userList;
Expand Down
4 changes: 2 additions & 2 deletions src/repository/userList.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class UserListRepository {
*
* @returns { Promise<UserList> } user
*/
public async getAllUsers(): Promise<User[]> {
return await this.storage.getAllUsers();
public async getUserList(): Promise<User[]> {
return await this.storage.getUserList();
}
}

0 comments on commit e5fbbbf

Please sign in to comment.