Change response codes
This commit is contained in:
parent
519c68c455
commit
29af01c619
@ -34,18 +34,16 @@ def ingress(key):
|
||||
"content-type": content_type,
|
||||
}
|
||||
else:
|
||||
abort(401)
|
||||
return make_response("", 404)
|
||||
|
||||
resp = make_response("", 201)
|
||||
return resp
|
||||
return make_response("", 201)
|
||||
|
||||
@app.route("/data/<string:name>/")
|
||||
def data(name):
|
||||
if not name in config:
|
||||
abort(404)
|
||||
return make_response("", 404)
|
||||
if not name in values:
|
||||
resp = make_response("", 204)
|
||||
return resp
|
||||
return make_response("", 404)
|
||||
resp = make_response(values[name]["payload"], 200)
|
||||
resp.headers['content-type'] = values[name]["content-type"]
|
||||
return resp
|
||||
|
Loading…
Reference in New Issue
Block a user