changed port to 8080 - keep it uniform with views.py

geo
Alex 7 years ago
parent 6fa69012b7
commit b24d05e77d

@ -95,8 +95,6 @@ class BookSchema(Schema):
def must_not_be_blank(data): def must_not_be_blank(data):
if not data: if not data:
raise ValidationError('You forgot to write stuff.') raise ValidationError('You forgot to write stuff.')

@ -311,7 +311,7 @@ def get_books():
@app.route('/api/books/<int:id>', methods=['GET']) @app.route('/api/books/<int:id>', methods=['GET'])
def get_book_by_id(id): def get_book_by_id(id):
book = Book.query.get(id) book = Book.query.get(id)
data, error = book_schema.dump(book) data = book_schema.dump(book)
if not data: if not data:
return jsonify({"message": "Book could not be found."}), 400 return jsonify({"message": "Book could not be found."}), 400
else: else:

@ -1,3 +1,3 @@
#! /usr/bin/env python #! /usr/bin/env python
from app import app from app import app
app.run(debug=True,host="0.0.0.0",port=8000) app.run(debug=True,host="0.0.0.0",port=8080)

Loading…
Cancel
Save