Merge pull request #3389 from omnivore-app/fix/refresh-feed-api-url

Fix endpoint for internal refresh feed API call
This commit is contained in:
Jackson Harper 2024-01-18 17:13:05 +08:00 committed by GitHub
commit 3f163a99c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -200,8 +200,13 @@ 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
const REST_BACKEND_ENDPOINT = `${process.env.INTERNAL_API_URL}/api`
if (!JWT_SECRET || !REST_BACKEND_ENDPOINT) {
throw 'Environment not configured correctly'