change response of events

This commit is contained in:
Tim Gröger 2021-01-23 16:08:14 +01:00
parent a0d1567b3c
commit 9bbae33e4c
2 changed files with 3 additions and 3 deletions

View File

@ -66,8 +66,8 @@ def new_event_type(current_session):
data = request.get_json()
if "name" not in data:
raise BadRequest
event_controller.create_event_type(data["name"])
return "", CREATED
event = event_controller.create_event_type(data["name"])
return jsonify(event)
@schedule_bp.route("/event-types/<name>", methods=["PUT", "DELETE"])

View File

@ -14,7 +14,7 @@ from flaschengeist.database import db
class EventType(db.Model, ModelSerializeMixin):
__tablename__ = "schedule_event_type"
id_: int = db.Column("id", db.Integer, primary_key=True)
id: int = db.Column("id", db.Integer, primary_key=True)
name: str = db.Column(db.String(30), nullable=False, unique=True)