Skip to content

Commit

Permalink
teapot removed
Browse files Browse the repository at this point in the history
  • Loading branch information
yassiommi committed Jun 12, 2020
1 parent 85510f7 commit e8ca3b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ felan.txt
.vscode/
__pycache__
.DS_Store
DATABASE_CREDENTIALS.txt
DATABASE_CREDENTIALS.txt
6 changes: 3 additions & 3 deletions foods/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_yevade(calorie):
submit_diet_record([catdog[0].id], get_jwt_identity())
return jsonify({'diet': [catdog[0].simple_view, catdog[1]]}), 200
else:
return jsonify({'error': 'I\'m a teapot'}), 418
return jsonify({'error': 'Calorie value can\'t be zero'}), 418


@foods.route('/dovade/<int:calorie>', methods=['GET'])
Expand All @@ -57,7 +57,7 @@ def get_dovade(calorie):
submit_diet_record([catdog[0].id, catdog[1].id], get_jwt_identity())
return jsonify({'diet': [catdog[0].simple_view, catdog[1].simple_view, catdog[2]]}), 200
else:
return jsonify({'error': 'I\'m a teapot'}), 418
return jsonify({'error': 'Calorie value can\'t be zero'}), 418


@foods.route('/sevade/<int:calorie>', methods=['GET'])
Expand All @@ -81,7 +81,7 @@ def get_sevade(calorie):
return jsonify(
{'diet': [catdog[0].simple_view, catdog[1].simple_view, catdog[2].simple_view, catdog[3]]}), 200
else:
return jsonify({'error': 'I\'m a teapot'}), 418
return jsonify({'error': 'Calorie value can\'t be zero'}), 418


@foods.route('/recipe/<int:id>', methods=['GET'])
Expand Down

0 comments on commit e8ca3b2

Please sign in to comment.