Revert fix

pull/9078/head
zomars 2022-12-02 18:39:30 -07:00
parent e15f6abc9b
commit b3443cd22d
1 changed files with 4 additions and 1 deletions

View File

@ -18,8 +18,11 @@ export const customPrismaClient: NextMiddleware = async (req, res, next) => {
await next(); await next();
return; return;
} }
// If we have a key, we check if the deployment matching the key, has a databaseUrl value set. // If we have a key, we check if the deployment matching the key, has a databaseUrl value set.
const databaseUrl = await fetch(`${CONSOLE_URL}/api/deployments/database?key=${key}`) const databaseUrl = await fetch(
`${process.env.NEXT_PUBLIC_CONSOLE_URL || CONSOLE_URL}/api/deployments/database?key=${key}`
)
.then((res) => res.json()) .then((res) => res.json())
.then((res) => res.databaseUrl); .then((res) => res.databaseUrl);