mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-11-15 23:00:10 +00:00
fix panic when jfa-go user has no email set with jellyfin_login
This commit is contained in:
parent
456ca8592c
commit
5ba40cd6f8
4
api.go
4
api.go
@ -454,7 +454,9 @@ func (app *appContext) GetInvites(gc *gin.Context) {
|
|||||||
var address string
|
var address string
|
||||||
if app.config.Section("ui").Key("jellyfin_login").MustBool(false) {
|
if app.config.Section("ui").Key("jellyfin_login").MustBool(false) {
|
||||||
app.storage.loadEmails()
|
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 {
|
} else {
|
||||||
address = app.config.Section("ui").Key("email").String()
|
address = app.config.Section("ui").Key("email").String()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user