Fix locations endpoint base URL default: my.workforce.com not my.tanda.co

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-07 15:38:09 +00:00
parent b70491dea2
commit 0571613012

View file

@ -118,7 +118,7 @@ export async function integrationRoutes(app) {
if (!row?.enabled) return reply.status(400).send({ error: 'Workforce integration not enabled' }) if (!row?.enabled) return reply.status(400).send({ error: 'Workforce integration not enabled' })
const creds = { ...row.config, ...decryptSecrets(row) } const creds = { ...row.config, ...decryptSecrets(row) }
if (!creds.bearer_token) return reply.status(400).send({ error: 'Workforce bearer token not configured' }) if (!creds.bearer_token) return reply.status(400).send({ error: 'Workforce bearer token not configured' })
const baseUrl = creds.base_url || 'https://my.tanda.co' const baseUrl = creds.base_url || 'https://my.workforce.com'
// /api/v2/locations list may be billing-locked — get unique IDs from teams then fetch each individually // /api/v2/locations list may be billing-locked — get unique IDs from teams then fetch each individually
const teams = [] const teams = []