map id on select
This commit is contained in:
parent
50fb96c200
commit
39d35857a1
|
@ -1,6 +1,7 @@
|
||||||
package host
|
package host
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -23,6 +24,7 @@ func getDomain(ctx context.Context, w http.ResponseWriter) (domain Domain, retur
|
||||||
w.WriteHeader(http.StatusBadRequest)
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
fmt.Println(id)
|
||||||
if login.Superadmin {
|
if login.Superadmin {
|
||||||
dbconnection.Where(map[string]int64{"ID": id}).Find(&domain)
|
dbconnection.Where(map[string]int64{"ID": id}).Find(&domain)
|
||||||
} else {
|
} else {
|
||||||
|
|
Reference in New Issue