From 776f22ce621f776a90cdbdc1cc5febd5b4ec76cf Mon Sep 17 00:00:00 2001 From: "open-swe-dev-andrinoid[bot]" Date: Thu, 29 Jan 2026 19:11:06 +0000 Subject: [PATCH] Apply patch [skip ci] --- routes/api/lease/approve.ts | 6 ++---- routes/api/lease/reject.ts | 8 +++----- routes/api/lease/request-approval.ts | 5 ++++- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/routes/api/lease/approve.ts b/routes/api/lease/approve.ts index 3120c34..10dfc62 100644 --- a/routes/api/lease/approve.ts +++ b/routes/api/lease/approve.ts @@ -4,9 +4,7 @@ import { SessionCookie } from "../../auth/callback.ts"; import { approveLease, getLeaseById } from "../../../services/leaseService.ts"; import { getUserById } from "../../../services/userService.ts"; import { getPropertyById } from "../../../services/propertyService.ts"; -import { - sendLeaseApproved, -} from "../../../services/notificationService.ts"; +import { sendLeaseApproved } from "../../../services/notificationService.ts"; export const handler = define.handlers({ async POST(ctx) { @@ -83,7 +81,7 @@ export const handler = define.handlers({ } const approvedLease = result[0]; - + if (lease.tenant_id) { const tenant = await getUserById(lease.tenant_id); const landlord = await getUserById(user_id); diff --git a/routes/api/lease/reject.ts b/routes/api/lease/reject.ts index 11aab46..cb0a11c 100644 --- a/routes/api/lease/reject.ts +++ b/routes/api/lease/reject.ts @@ -1,12 +1,10 @@ // routes/api/lease/reject.ts import { define } from "../../../utils.ts"; import { SessionCookie } from "../../auth/callback.ts"; -import { rejectLease, getLeaseById } from "../../../services/leaseService.ts"; +import { getLeaseById, rejectLease } from "../../../services/leaseService.ts"; import { getUserById } from "../../../services/userService.ts"; import { getPropertyById } from "../../../services/propertyService.ts"; -import { - sendLeaseRejected, -} from "../../../services/notificationService.ts"; +import { sendLeaseRejected } from "../../../services/notificationService.ts"; export const handler = define.handlers({ async POST(ctx) { @@ -85,7 +83,7 @@ export const handler = define.handlers({ } const rejectedLease = result[0]; - + if (lease.tenant_id) { const tenant = await getUserById(lease.tenant_id); const landlord = await getUserById(user_id); diff --git a/routes/api/lease/request-approval.ts b/routes/api/lease/request-approval.ts index 70af612..79322eb 100644 --- a/routes/api/lease/request-approval.ts +++ b/routes/api/lease/request-approval.ts @@ -1,7 +1,10 @@ // routes/api/lease/request-approval.ts import { define } from "../../../utils.ts"; import { SessionCookie } from "../../auth/callback.ts"; -import { requestLeaseApproval } from "../../../services/leaseService.ts"; +import { + getLeaseById, + requestLeaseApproval, +} from "../../../services/leaseService.ts"; import { getTenantInviteById, updateTenantInvite,