fixed monolith for docker users

This commit is contained in:
daniel31x13
2024-06-27 18:19:07 -04:00
parent 9fa9fe5db0
commit 22b2734494
7 changed files with 23 additions and 71 deletions
+2 -1
View File
@@ -2,7 +2,8 @@ import { prisma } from "@/lib/api/db";
import { LinkRequestQuery, Sort } from "@/types/global";
export default async function getLink(userId: number, query: LinkRequestQuery) {
const POSTGRES_IS_ENABLED = process.env.DATABASE_URL.startsWith("postgresql");
const POSTGRES_IS_ENABLED =
process.env.DATABASE_URL?.startsWith("postgresql");
let order: any;
if (query.sort === Sort.DateNewestFirst) order = { id: "desc" };