Fix checks for env vars

This commit is contained in:
Jackson Harper 2024-01-18 16:59:53 +08:00
parent 3b0338967d
commit 3f707c06f2

View file

@ -200,6 +200,11 @@ const sendUpdateSubscriptionMutation = async (
lastFetchedChecksum: string,
scheduledAt: Date
) => {
if (!process.env.INTERNAL_API_URL || !env.server.jwtSecret) {
throw new Error(
'Can not send update subscription, environment not configured.'
)
}
const JWT_SECRET = env.server.jwtSecret
const REST_BACKEND_ENDPOINT = `${process.env.INTERNAL_API_URL}/api`