imprerove no content
This commit is contained in:
parent
3e884ea39b
commit
28e3b949e6
@ -33,7 +33,7 @@
|
|||||||
"31": "TCM Cin\u00e9ma\n",
|
"31": "TCM Cin\u00e9ma\n",
|
||||||
"32": "Paramount Channel\n",
|
"32": "Paramount Channel\n",
|
||||||
"33": "Action\n",
|
"33": "Action\n",
|
||||||
"34": "SundanceTV\n",
|
"34": "Sundance TV\n",
|
||||||
"38": "Fox Play\n",
|
"38": "Fox Play\n",
|
||||||
"40": "Com\u00e9die+\n",
|
"40": "Com\u00e9die+\n",
|
||||||
"41": "Polar+\n",
|
"41": "Polar+\n",
|
||||||
|
@ -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