mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-18 10:06:26 +00:00
Skip auto dumping database migration
Fix user id from context
This commit is contained in:
@ -64,7 +64,7 @@ func CreateAccessList() func(http.ResponseWriter, *http.Request) {
|
||||
}
|
||||
|
||||
// Get userID from token
|
||||
userID, _ := r.Context().Value(c.UserIDCtxKey).(int)
|
||||
userID, _ := r.Context().Value(c.UserIDCtxKey).(uint)
|
||||
newItem.UserID = userID
|
||||
|
||||
if err = newItem.Save(); err != nil {
|
||||
|
@ -70,7 +70,7 @@ func CreateDNSProvider() func(http.ResponseWriter, *http.Request) {
|
||||
}
|
||||
|
||||
// Get userID from token
|
||||
userID, _ := r.Context().Value(c.UserIDCtxKey).(int)
|
||||
userID, _ := r.Context().Value(c.UserIDCtxKey).(uint)
|
||||
newItem.UserID = userID
|
||||
|
||||
if err = newItem.Save(); err != nil {
|
||||
|
@ -68,7 +68,7 @@ func CreateNginxTemplate() func(http.ResponseWriter, *http.Request) {
|
||||
}
|
||||
|
||||
// Get userID from token
|
||||
userID, _ := r.Context().Value(c.UserIDCtxKey).(int)
|
||||
userID, _ := r.Context().Value(c.UserIDCtxKey).(uint)
|
||||
newNginxTemplate.UserID = userID
|
||||
|
||||
if err = newNginxTemplate.Save(); err != nil {
|
||||
|
@ -68,7 +68,7 @@ func CreateStream() func(http.ResponseWriter, *http.Request) {
|
||||
}
|
||||
|
||||
// Get userID from token
|
||||
userID, _ := r.Context().Value(c.UserIDCtxKey).(int)
|
||||
userID, _ := r.Context().Value(c.UserIDCtxKey).(uint)
|
||||
newHost.UserID = userID
|
||||
|
||||
if err = newHost.Save(); err != nil {
|
||||
|
Reference in New Issue
Block a user