update: eval base url (#5738)

* update: eval base url

* update: eval base url
This commit is contained in:
Ilango
2026-04-28 17:36:56 +05:30
committed by GitHub
parent c5755574b1
commit 700137738b
@@ -29,8 +29,7 @@ const createEvaluation = async (req: Request, res: Response, next: NextFunction)
const body = req.body
body.workspaceId = workspaceId
const httpProtocol = req.get('x-forwarded-proto') || req.get('X-Forwarded-Proto') || req.protocol
const baseURL = `${httpProtocol}://${req.get('host')}`
const baseURL = `${process.env.APP_URL}`
const apiResponse = await evaluationsService.createEvaluation(body, baseURL, orgId, workspaceId)
return res.json(apiResponse)
} catch (error) {
@@ -54,8 +53,7 @@ const runAgain = async (req: Request, res: Response, next: NextFunction) => {
`Error: evaluationsService.runAgain - workspace ${workspaceId} not found!`
)
}
const httpProtocol = req.get('x-forwarded-proto') || req.get('X-Forwarded-Proto') || req.protocol
const baseURL = `${httpProtocol}://${req.get('host')}`
const baseURL = `${process.env.APP_URL}`
const apiResponse = await evaluationsService.runAgain(req.params.id, baseURL, orgId, workspaceId)
return res.json(apiResponse)
} catch (error) {