1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 09:00:10 +00:00

fix panic when jfa-go user has no email set with jellyfin_login

This commit is contained in:
Harvey Tindall 2020-09-19 09:09:30 +01:00
parent 456ca8592c
commit 5ba40cd6f8
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2

4
api.go
View File

@ -454,7 +454,9 @@ func (app *appContext) GetInvites(gc *gin.Context) {
var address string
if app.config.Section("ui").Key("jellyfin_login").MustBool(false) {
app.storage.loadEmails()
address = app.storage.emails[gc.GetString("jfId")].(string)
if addr := app.storage.emails[gc.GetString("jfId")]; addr != nil {
address = addr.(string)
}
} else {
address = app.config.Section("ui").Key("email").String()
}