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