Skip to content

Commit

Permalink
Formatear archivo unique.decorator.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
fermelli committed Apr 30, 2024
1 parent 85209b4 commit 35480bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/common/decorators/unique.decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export class UniqueConstraint implements ValidatorConstraintInterface {
const [constraints] = args.constraints;
const { entity, column } = constraints as UniqueProperties;
const repository = this.dataSource.getRepository(entity);
const result = await repository.findOne({ where: { [column]: Equal(value) } });
const result = await repository.findOne({
where: { [column]: Equal(value) },
});

return result == null;
}
Expand Down Expand Up @@ -50,4 +52,4 @@ export function Unique(
validator: UniqueConstraint,
});
};
}
}

0 comments on commit 35480bf

Please sign in to comment.