Skip to content
Snippets Groups Projects
Commit f62db3af authored by ikramulhaq63's avatar ikramulhaq63
Browse files

fddd

parent c1d53d8e
No related branches found
No related tags found
No related merge requests found
......@@ -1243,7 +1243,12 @@ func getServices(w http.ResponseWriter, r *http.Request, appId string) {
return
}
consumedLocalOnly, err = strconv.ParseBool(parsedParam.Value)
consumedLocalOnlyPresent = err == nil
consumedLocalOnlyPresent = true
if err != nil {
consumedLocalOnly = false
consumedLocalOnlyPresent = false
}
}
isLocalParam := q.Get("vend-spec-etsi-mec-is-local")
......@@ -1256,7 +1261,11 @@ func getServices(w http.ResponseWriter, r *http.Request, appId string) {
return
}
isLocal, err = strconv.ParseBool(parsedParam.Value)
isLocalPresent = err == nil
isLocalPresent = true
if err != nil {
isLocal = false
isLocalPresent = false
}
}
scopeOfLocalityParam := q.Get("vend-spec-etsi-mec-scope-of-locality")
......
......@@ -1182,12 +1182,12 @@ func getServices(w http.ResponseWriter, r *http.Request, appId string) {
// Validate query parameters
u, _ := url.Parse(r.URL.String())
q := u.Query()
// validParams := []string{"ser_instance_id", "ser_name", "ser_category_id", "consumed_local_only", "is_local", "scope_of_locality"}
// err := validateQueryParams(q, validParams)
// if err != nil {
// errHandlerProblemDetails(w, err.Error(), http.StatusBadRequest)
// return
// }
validParams := []string{"ser_instance_id", "ser_name", "ser_category_id", "consumed_local_only", "is_local", "scope_of_locality"}
err := validateQueryParams(q, validParams)
if err != nil {
errHandlerProblemDetails(w, err.Error(), http.StatusBadRequest)
return
}
serInstanceId := q["ser_instance_id"]
serName := q["ser_name"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment