feat(services): remove unused import from rent.service.ts
The `body` import from "express-validator" has been removed from rent.service.ts as it was not used. Also, an error handler for deleting rent was updated to always return false on encountering an error, improving the error handling mechanism. Issue: #24 Signed-off-by: Mathis <yidhra@tuta.io>
This commit is contained in:
@@ -4,7 +4,6 @@ import { isDebugMode } from "@utils/debugState";
|
||||
import { Logger } from "tslog";
|
||||
import { v4 } from "uuid";
|
||||
import IDbRent from "@interfaces/database/IDbRent";
|
||||
import {body} from "express-validator";
|
||||
|
||||
const logger = new Logger({
|
||||
name: "RentService",
|
||||
@@ -148,6 +147,7 @@ async function deleteRentService(rentId: string) {
|
||||
return false;
|
||||
} catch (error) {
|
||||
logger.error(`\n\n> Error deleting rent: \n${error}\n`);
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user