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

pull/20/head
Harvey Tindall 4 years ago
parent 456ca8592c
commit 5ba40cd6f8
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -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()
}

Loading…
Cancel
Save