From 5b5727872145acc63c750c68c70796189f98fbe5 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 25 Jan 2021 13:10:28 +0100 Subject: [PATCH] [Plugin] schedule: Fixed invalid routes. --- flaschengeist/plugins/schedule/__init__.py | 4 ++-- flaschengeist/plugins/users/__init__.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/flaschengeist/plugins/schedule/__init__.py b/flaschengeist/plugins/schedule/__init__.py index 5f5b0f0..0cf6f54 100644 --- a/flaschengeist/plugins/schedule/__init__.py +++ b/flaschengeist/plugins/schedule/__init__.py @@ -32,7 +32,7 @@ class SchedulePlugin(Plugin): @schedule_bp.route("/event-types", methods=["GET"]) -@schedule_bp.route("/event-types/", methods=["GET"]) +@schedule_bp.route("/event-types/", 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/", methods=["PUT", "DELETE"]) +@schedule_bp.route("/event-types/", methods=["PUT", "DELETE"]) @login_required(permission=permissions.EVENT_TYPE) def modify_event_type(identifier, current_session): """Rename or delete an event type diff --git a/flaschengeist/plugins/users/__init__.py b/flaschengeist/plugins/users/__init__.py index 7bdbdec..8b75e2f 100644 --- a/flaschengeist/plugins/users/__init__.py +++ b/flaschengeist/plugins/users/__init__.py @@ -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