[BUGFIX] [host] edit web and mail
This commit is contained in:
parent
b69c90d6c6
commit
d8be895eb0
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
log "github.com/Sirupsen/logrus" // TODO-Bad
|
||||
log "github.com/sirupsen/logrus" // TODO-Bad
|
||||
|
||||
libsession "dev.sum7.eu/sum7/warehost/lib/session"
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@ package log
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/rifflock/lfshook"
|
||||
)
|
||||
|
||||
|
|
|
@ -121,6 +121,7 @@ func mailEdit(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
mail.Name = mailRequest.Name
|
||||
mail.LoginID = mailRequest.LoginID
|
||||
mail.Domain = nil
|
||||
|
||||
idsStay := map[int64]struct{}{}
|
||||
idsStay[0] = struct{}{}
|
||||
|
@ -146,6 +147,7 @@ func mailEdit(w http.ResponseWriter, r *http.Request) {
|
|||
libapi.JSONWrite(w, r, false, &libapi.ErrorResult{Message: "Internal Database Error with Database"})
|
||||
return
|
||||
}
|
||||
|
||||
if err := dbconnection.Save(mail).Error; err != nil {
|
||||
logger.Error("database: during modify host mail: ", err)
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
|
|
@ -143,6 +143,7 @@ func webEdit(w http.ResponseWriter, r *http.Request) {
|
|||
web.SSLRedirect = webRequest.SSLRedirect
|
||||
web.Redirect = webRequest.Redirect
|
||||
web.Proxy = webRequest.Proxy
|
||||
web.Domain = nil
|
||||
|
||||
idsOld := map[int64]struct{}{}
|
||||
for _, item := range web.HTTPAccess {
|
||||
|
|
|
@ -3,7 +3,7 @@ package host
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"context"
|
||||
|
||||
|
|
Reference in New Issue