mirror of
https://github.com/getAlby/hub.git
synced 2026-08-13 12:33:39 +02:00
Add GetBaseFrontendUrl() to remove duplication (#1506)
This commit is contained in:
parent
e1d9c7963e
commit
6eec16a57f
3 changed files with 10 additions and 8 deletions
|
|
@ -113,10 +113,7 @@ func (albyHttpSvc *AlbyHttpService) albyCallbackHandler(c echo.Context) error {
|
|||
return c.NoContent(http.StatusNoContent)
|
||||
}
|
||||
|
||||
redirectUrl := albyHttpSvc.appConfig.FrontendUrl
|
||||
if redirectUrl == "" {
|
||||
redirectUrl = albyHttpSvc.appConfig.BaseUrl
|
||||
}
|
||||
redirectUrl := albyHttpSvc.appConfig.GetBaseFrontendUrl()
|
||||
|
||||
if redirectUrl == "" {
|
||||
// OAuth using a custom client requires a base URL set for the callback
|
||||
|
|
|
|||
|
|
@ -1190,10 +1190,7 @@ func (httpSvc *HttpService) execCustomNodeCommandHandler(c echo.Context) error {
|
|||
}
|
||||
|
||||
func (httpSvc *HttpService) logoutHandler(c echo.Context) error {
|
||||
redirectUrl := httpSvc.cfg.GetEnv().FrontendUrl
|
||||
if redirectUrl == "" {
|
||||
redirectUrl = httpSvc.cfg.GetEnv().BaseUrl
|
||||
}
|
||||
redirectUrl := httpSvc.cfg.GetEnv().GetBaseFrontendUrl()
|
||||
if redirectUrl == "" {
|
||||
redirectUrl = "/"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue