Skip to content

Commit

Permalink
refactor: change id type from Int to String in repository and user mock
Browse files Browse the repository at this point in the history
  • Loading branch information
davidambz committed May 1, 2024
1 parent 014d295 commit e09f6d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class UserRepository {
});
}

async findById(id: number) {
async findById(id: string) {
const user = await database.user.findUnique({
select: expect.anything(),
where: {
Expand Down
3 changes: 1 addition & 2 deletions src/shared/test-helpers/mocks/user.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ export class UserMock {
public static create() {
return {
email: faker.internet.email(),
id: faker.number.int(),
id: faker.string.numeric(),
name: faker.person.firstName(),
name: faker.person.fullName(),
password: faker.internet.password(),
username: faker.internet.userName(),
};
Expand Down

0 comments on commit e09f6d8

Please sign in to comment.