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
@@ -4,7 +4,8 @@ import { LinkRequestQuery, Sort } from "@/types/global";
export default async function getLink(
query: Omit<LinkRequestQuery, "tagId" | "pinnedOnly">
) {
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" };