change response of events
This commit is contained in:
parent
a0d1567b3c
commit
9bbae33e4c
|
@ -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"])
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue