fix: derive currentUrl from actual page path (#89)

This commit is contained in:
httpjamesm 2024-03-09 11:28:45 -05:00 committed by GitHub
parent 01b960cd43
commit ff66f41f47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -109,7 +109,7 @@ func ViewQuestion(c *gin.Context) {
"answers": answers, "answers": answers,
"imagePolicy": imagePolicy, "imagePolicy": imagePolicy,
"theme": c.MustGet("theme").(string), "theme": c.MustGet("theme").(string),
"currentUrl": fmt.Sprintf("%s/questions/%s/%s", os.Getenv("APP_URL"), questionId, params.QuestionTitle), "currentUrl": fmt.Sprintf("%s%s", os.Getenv("APP_URL"), c.Request.URL.Path),
"sortValue": params.SoSortValue, "sortValue": params.SoSortValue,
"domain": domain, "domain": domain,
}) })