From 77e2d92d713db47c887e26ded2abcbf30541f0ef Mon Sep 17 00:00:00 2001 From: shafi54 <108669266+shafi-aviz@users.noreply.github.com> Date: Thu, 29 Jan 2026 14:42:16 +0530 Subject: [PATCH] enh --- apps/backend/src/trpc/admin-apis/vendor-snippets.ts | 5 +++-- packages/ui/index.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/backend/src/trpc/admin-apis/vendor-snippets.ts b/apps/backend/src/trpc/admin-apis/vendor-snippets.ts index 4fa00d2..a58fe4a 100644 --- a/apps/backend/src/trpc/admin-apis/vendor-snippets.ts +++ b/apps/backend/src/trpc/admin-apis/vendor-snippets.ts @@ -1,5 +1,6 @@ import { router, publicProcedure, protectedProcedure } from '../trpc-index'; import { z } from 'zod'; +import dayjs from 'dayjs'; import { db } from '../../db/db_index'; import { vendorSnippets, deliverySlotInfo, productInfo, orders, orderItems, users, orderStatus } from '../../db/schema'; import { eq, and, inArray, isNotNull, gt, sql, asc, ne } from 'drizzle-orm'; @@ -336,11 +337,11 @@ export const vendorSnippetsRouter = router({ getUpcomingSlots: publicProcedure .query(async () => { - const now = new Date(); + const threeHoursAgo = dayjs().subtract(3, 'hour').toDate(); const slots = await db.query.deliverySlotInfo.findMany({ where: and( eq(deliverySlotInfo.isActive, true), - gt(deliverySlotInfo.deliveryTime, now) + gt(deliverySlotInfo.deliveryTime, threeHoursAgo) ), orderBy: asc(deliverySlotInfo.deliveryTime), }); diff --git a/packages/ui/index.ts b/packages/ui/index.ts index db929af..b448e91 100755 --- a/packages/ui/index.ts +++ b/packages/ui/index.ts @@ -64,8 +64,8 @@ const isDevMode = Constants.executionEnvironment !== "standalone"; // const BASE_API_URL = 'http://10.0.2.2:4000'; // const BASE_API_URL = 'http://192.168.100.101:4000'; // const BASE_API_URL = 'http://192.168.1.14:4000'; -// let BASE_API_URL = "https://mf.freshyo.in"; - let BASE_API_URL = 'http://192.168.100.103:4000'; +let BASE_API_URL = "https://mf.freshyo.in"; + // let BASE_API_URL = 'http://192.168.100.103:4000'; // let BASE_API_URL = 'http://192.168.29.219:4000'; // if(isDevMode) {