use service base url

This commit is contained in:
Hongbo Wu 2023-11-16 11:54:34 +08:00
parent 25d0123007
commit 148f329770

View file

@ -185,14 +185,14 @@ const createFollowingTask = async (
try {
console.log('Creating task', input.url)
const apiEndpoint = process.env.REST_BACKEND_ENDPOINT
const serviceBaseUrl = process.env.INTERNAL_SVC_ENDPOINT
const token = process.env.PUBSUB_VERIFICATION_TOKEN
if (!apiEndpoint || !token) {
if (!serviceBaseUrl || !token) {
throw 'Environment not configured correctly'
}
// save page
const taskHandlerUrl = `${apiEndpoint}/svc/following/save?token=${token}`
const taskHandlerUrl = `${serviceBaseUrl}svc/following/save?token=${token}`
const task = await createCloudTask(taskHandlerUrl, input)
console.log('Created task', task)