404 on get returns empty object and right status
This commit is contained in:
@@ -53,8 +53,8 @@ func whoGet(namespace string, g storage.Graph, w http.ResponseWriter, r *http.Re
|
||||
return err
|
||||
}
|
||||
if len(ones) == 0 {
|
||||
http.NotFound(w, r)
|
||||
return nil
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
return json.NewEncoder(w).Encode(entity.One{})
|
||||
}
|
||||
if len(ones) > 1 {
|
||||
return errors.New("more than one result found matching " + id)
|
||||
|
||||
Reference in New Issue
Block a user