Fix /info endpoint 500 error when no openid providers were configured
This commit is contained in:
parent
ae6144c042
commit
d2d610e0f5
2 changed files with 9 additions and 2 deletions
|
|
@ -17,6 +17,7 @@
|
|||
package v1
|
||||
|
||||
import (
|
||||
"code.vikunja.io/api/pkg/log"
|
||||
"net/http"
|
||||
|
||||
"code.vikunja.io/api/pkg/config"
|
||||
|
|
@ -98,7 +99,8 @@ func Info(c echo.Context) error {
|
|||
|
||||
providers, err := openid.GetAllProviders()
|
||||
if err != nil {
|
||||
return err
|
||||
log.Errorf("Error while getting openid providers for /info: %s", err)
|
||||
// No return here to not break /info
|
||||
}
|
||||
|
||||
info.AuthInfo.OpenIDConnect.Providers = providers
|
||||
|
|
|
|||
Reference in a new issue