[Plugin] schedule: Fixed invalid routes.

This commit is contained in:
Ferdinand Thiessen 2021-01-25 13:10:28 +01:00
parent 94ffc706e7
commit 5b57278721
2 changed files with 4 additions and 5 deletions

View File

@ -32,7 +32,7 @@ class SchedulePlugin(Plugin):
@schedule_bp.route("/event-types", methods=["GET"])
@schedule_bp.route("/event-types/<identifier:int>", methods=["GET"])
@schedule_bp.route("/event-types/<int:identifier>", methods=["GET"])
@login_required()
def get_event_types(current_session, identifier=None):
"""Get EventType(s)
@ -76,7 +76,7 @@ def new_event_type(current_session):
return jsonify(event_type)
@schedule_bp.route("/event-types/<identifier:int>", methods=["PUT", "DELETE"])
@schedule_bp.route("/event-types/<int:identifier>", methods=["PUT", "DELETE"])
@login_required(permission=permissions.EVENT_TYPE)
def modify_event_type(identifier, current_session):
"""Rename or delete an event type

View File

@ -3,15 +3,14 @@
Provides routes used to manage users
"""
from http.client import NO_CONTENT, CREATED
from flaschengeist.config import config
from flask import Blueprint, request, jsonify, make_response, Response
from werkzeug.exceptions import BadRequest, Forbidden, MethodNotAllowed, NotFound
from . import permissions
from flaschengeist import logger
from flaschengeist.models.user import User, _Avatar
from flaschengeist.config import config
from flaschengeist.plugins import Plugin
from flaschengeist.models.user import User, _Avatar
from flaschengeist.decorator import login_required, extract_session
from flaschengeist.controller import userController
from flaschengeist.utils.HTTP import created