Skip to content
Snippets Groups Projects
Commit fd82303a authored by Odin Aas's avatar Odin Aas :cry:
Browse files

various changes, removing redundant comments and such

parent 9a9c70b4
No related branches found
No related tags found
2 merge requests!66Dev branch,!60Overview
......@@ -33,7 +33,7 @@ func NewUser(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusInternalServerError)
return
}
if permissionLevel != 0 {
if permissionLevel != 0 || userData.User.Permission > 3 || userData.User.Permission < 0 {
w.WriteHeader(http.StatusUnauthorized)
return
}
......
......@@ -31,7 +31,6 @@ func NewGatewayDevice(eui string, name string) OutputGateway {
func DoNewRequest(body io.Reader, url string, method string) error {
//create request
//TODO: replace url with a environment variable
request, err := http.NewRequest(method, url, body)
if err != nil {
return err
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment