mirror of
https://github.com/gravitl/netmaker.git
synced 2024-09-21 15:56:07 +08:00
remove network param
This commit is contained in:
parent
41fe78ccaf
commit
e95772b1c0
|
@ -27,7 +27,7 @@ func hostHandlers(r *mux.Router) {
|
|||
r.HandleFunc("/api/hosts/{hostid}/networks/{network}", logic.SecurityCheck(true, http.HandlerFunc(deleteHostFromNetwork))).Methods(http.MethodDelete)
|
||||
r.HandleFunc("/api/hosts/{hostid}/relay", logic.SecurityCheck(false, http.HandlerFunc(createHostRelay))).Methods(http.MethodPost)
|
||||
r.HandleFunc("/api/hosts/{hostid}/relay", logic.SecurityCheck(false, http.HandlerFunc(deleteHostRelay))).Methods(http.MethodDelete)
|
||||
r.HandleFunc("/api/hosts/adm/{network}/authenticate", authenticateHost).Methods(http.MethodPost)
|
||||
r.HandleFunc("/api/hosts/adm/authenticate", authenticateHost).Methods(http.MethodPost)
|
||||
}
|
||||
|
||||
// swagger:route GET /api/hosts hosts getHosts
|
||||
|
@ -342,7 +342,7 @@ func authenticateHost(response http.ResponseWriter, request *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
tokenString, err := logic.CreateJWT(authRequest.ID, authRequest.MacAddress, mux.Vars(request)["network"])
|
||||
tokenString, err := logic.CreateJWT(authRequest.ID, authRequest.MacAddress, "")
|
||||
if tokenString == "" {
|
||||
errorResponse.Code = http.StatusUnauthorized
|
||||
errorResponse.Message = "unauthorized"
|
||||
|
|
Loading…
Reference in a new issue