Correction booléen asynchrone

This commit is contained in:
2024-12-11 23:39:47 +01:00
parent af14cfb11d
commit 54a7806316
5 changed files with 10 additions and 11 deletions

View File

@ -49,7 +49,7 @@ export class GeolocationsService {
}
async remove(id: number): Promise<Geolocation> {
if (!this.findOne(id))
if (!await this.findOne(id))
throw new NotFoundException(`Aucune géolocalisation n'existe avec l'identifiant ${id}`)
return await this.prisma.geolocation.delete({ where: { id } })
}