[Plugin] schedule: Fixed invalid routes.
This commit is contained in:
parent
94ffc706e7
commit
5b57278721
|
@ -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/<identifier:int>", methods=["GET"])
|
@schedule_bp.route("/event-types/<int:identifier>", methods=["GET"])
|
||||||
@login_required()
|
@login_required()
|
||||||
def get_event_types(current_session, identifier=None):
|
def get_event_types(current_session, identifier=None):
|
||||||
"""Get EventType(s)
|
"""Get EventType(s)
|
||||||
|
@ -76,7 +76,7 @@ def new_event_type(current_session):
|
||||||
return jsonify(event_type)
|
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)
|
@login_required(permission=permissions.EVENT_TYPE)
|
||||||
def modify_event_type(identifier, current_session):
|
def modify_event_type(identifier, current_session):
|
||||||
"""Rename or delete an event type
|
"""Rename or delete an event type
|
||||||
|
|
|
@ -3,15 +3,14 @@
|
||||||
Provides routes used to manage users
|
Provides routes used to manage users
|
||||||
"""
|
"""
|
||||||
from http.client import NO_CONTENT, CREATED
|
from http.client import NO_CONTENT, CREATED
|
||||||
|
|
||||||
from flaschengeist.config import config
|
|
||||||
from flask import Blueprint, request, jsonify, make_response, Response
|
from flask import Blueprint, request, jsonify, make_response, Response
|
||||||
from werkzeug.exceptions import BadRequest, Forbidden, MethodNotAllowed, NotFound
|
from werkzeug.exceptions import BadRequest, Forbidden, MethodNotAllowed, NotFound
|
||||||
|
|
||||||
from . import permissions
|
from . import permissions
|
||||||
from flaschengeist import logger
|
from flaschengeist import logger
|
||||||
from flaschengeist.models.user import User, _Avatar
|
from flaschengeist.config import config
|
||||||
from flaschengeist.plugins import Plugin
|
from flaschengeist.plugins import Plugin
|
||||||
|
from flaschengeist.models.user import User, _Avatar
|
||||||
from flaschengeist.decorator import login_required, extract_session
|
from flaschengeist.decorator import login_required, extract_session
|
||||||
from flaschengeist.controller import userController
|
from flaschengeist.controller import userController
|
||||||
from flaschengeist.utils.HTTP import created
|
from flaschengeist.utils.HTTP import created
|
||||||
|
|
Loading…
Reference in New Issue