Compare commits

..

2 commits

Author SHA1 Message Date
bcea5099bc Lazygit test no. 1 2024-04-05 14:27:08 -04:00
e11aa4c751 Committing before test 2024-04-05 14:26:43 -04:00

View file

@ -5,25 +5,29 @@ import { Cat } from "./cats.entity";
@Injectable()
export class CatsService {
constructor(
@InjectRepository(Cat)
private catsRepository: Repository<Cat>,
) {}
constructor(
@InjectRepository(Cat)
private catsRepository: Repository<Cat>,
) { }
private readonly logger = new Logger(CatsService.name);
private readonly logger = new Logger(CatsService.name);
findAll(): Promise<Cat[]> {
this.logger.log("[findAll] Starting...");
return this.catsRepository.find();
}
findAll(): Promise<Cat[]> {
this.logger.log("[findAll] Starting...");
return this.catsRepository.find();
}
findOne(id: number): Promise<Cat | null> {
this.logger.log("[findOne] Starting...");
return this.catsRepository.findOneBy({ id });
}
findOne(id: number): Promise<Cat | null> {
this.logger.log("[findOne] Starting...");
return this.catsRepository.findOneBy({ id });
}
async remove(id: number): Promise<void> {
this.logger.log("[remove] Starting...");
await this.catsRepository.delete(id)
}
async remove(id: number): Promise<void> {
this.logger.log("[remove] Starting...");
await this.catsRepository.delete(id)
}
lazygitTest(): void {
this.logger.log("[lazygitTest] test no. 1")
}
}