sum7/warehost
sum7
/
warehost
Archived
1
0
Fork 0

[BUGFIX] [host] edit web and mail

This commit is contained in:
Martin Geno 2017-10-04 12:32:07 +02:00
parent b69c90d6c6
commit d8be895eb0
No known key found for this signature in database
GPG Key ID: F0D39A37E925E941
5 changed files with 6 additions and 3 deletions

View File

@ -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"
)

View File

@ -3,7 +3,7 @@ package log
import (
"net/http"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/rifflock/lfshook"
)

View File

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

View File

@ -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 {

View File

@ -3,7 +3,7 @@ package host
import (
"net/http"
"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
"context"