imprerove no content
This commit is contained in:
parent
3e884ea39b
commit
28e3b949e6
@ -15,11 +15,15 @@ def ping_pong():
|
|||||||
|
|
||||||
@app.route('/api/v1/chaine/<num>', methods=['GET'])
|
@app.route('/api/v1/chaine/<num>', methods=['GET'])
|
||||||
def get_chaine(num):
|
def get_chaine(num):
|
||||||
return jsonify(data.get_chaine(num))
|
chaine=data.get_chaine(num)
|
||||||
|
if (chaine == "numero de chaine inconnue"):
|
||||||
|
return make_response("",204)
|
||||||
|
else:
|
||||||
|
return jsonify(chaine)
|
||||||
|
|
||||||
@app.route('/api/v1/chaine/', methods=['put'])
|
@app.route('/api/v1/chaine/', methods=['put'])
|
||||||
def update_list():
|
def update_list():
|
||||||
status="data.parsechaine()"
|
status=data.parsechaine()
|
||||||
if(status=='ok'):
|
if(status=='ok'):
|
||||||
return jsonify("OK")
|
return jsonify("OK")
|
||||||
else:
|
else:
|
||||||
@ -29,7 +33,7 @@ def update_list():
|
|||||||
def get_emmission(num):
|
def get_emmission(num):
|
||||||
chaine=data.get_chaine(num)
|
chaine=data.get_chaine(num)
|
||||||
if (chaine == "numero de chaine inconnue"):
|
if (chaine == "numero de chaine inconnue"):
|
||||||
return jsonify(chaine)
|
return make_response("",204)
|
||||||
else:
|
else:
|
||||||
return jsonify(emission.parse_emmission(chaine))
|
return jsonify(emission.parse_emmission(chaine))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user