API: Fix Flask 2.0.x incompatible blueprint names
This commit is contained in:
parent
95d7c18b13
commit
dedc26ad97
|
@ -3,7 +3,7 @@ import tarfile
|
|||
from flask import Blueprint, abort, send_file
|
||||
from srht.oauth import oauth
|
||||
|
||||
internal = Blueprint("api.internal", __name__)
|
||||
internal = Blueprint("api_internal", __name__)
|
||||
|
||||
@internal.route("/api/_internal/data-export")
|
||||
@oauth(None, require_internal=True)
|
||||
|
|
|
@ -13,7 +13,7 @@ from todosrht.types import Event, EventType, Label, TicketLabel, TicketComment
|
|||
from todosrht.types import TicketAuthenticity, ParticipantType
|
||||
from todosrht.webhooks import TrackerWebhook, TicketWebhook
|
||||
|
||||
tickets = Blueprint("api.tickets", __name__)
|
||||
tickets = Blueprint("api_tickets", __name__)
|
||||
|
||||
@tickets.route("/api/user/<username>/trackers/<tracker_name>/tickets")
|
||||
@tickets.route("/api/trackers/<tracker_name>/tickets",
|
||||
|
|
|
@ -9,7 +9,7 @@ from todosrht.tickets import get_participant_for_user
|
|||
from todosrht.types import Label, Tracker, TicketAccess, TicketSubscription
|
||||
from todosrht.webhooks import UserWebhook, TrackerWebhook
|
||||
|
||||
trackers = Blueprint("api.trackers", __name__)
|
||||
trackers = Blueprint("api_trackers", __name__)
|
||||
|
||||
@trackers.route("/api/user/<username>/trackers")
|
||||
@trackers.route("/api/trackers", defaults={"username": None})
|
||||
|
|
Loading…
Reference in New Issue