upgrade react-query to v5
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
from flask import jsonify, request
|
||||
from flask import jsonify, request, Blueprint
|
||||
from api import require_auth
|
||||
from api.setting import setting_bp
|
||||
from db import get_db
|
||||
from db.models.WebhookSetting import WebhookSetting
|
||||
|
||||
|
||||
@setting_bp.route('/path/webhook/', methods=['GET'])
|
||||
path_webhook_setting_bp = Blueprint('path_webhook_setting', __name__, url_prefix='/api/setting/path/webhook')
|
||||
@path_webhook_setting_bp.route('/', methods=['GET'])
|
||||
@require_auth(roles=['admin'])
|
||||
def list_webhook_settings():
|
||||
"""
|
||||
@@ -25,7 +24,7 @@ def list_webhook_settings():
|
||||
return jsonify([s.to_dict() for s in settings]), 200
|
||||
|
||||
|
||||
@setting_bp.route('/path/webhook/<int:setting_id>', methods=['GET'])
|
||||
@path_webhook_setting_bp.route('/<int:setting_id>', methods=['GET'])
|
||||
@require_auth(roles=['admin'])
|
||||
def webhook_setting(setting_id):
|
||||
"""
|
||||
@@ -51,7 +50,7 @@ def webhook_setting(setting_id):
|
||||
return jsonify(setting.to_dict()), 200
|
||||
|
||||
|
||||
@setting_bp.route('/path/webhook/', methods=['POST'])
|
||||
@path_webhook_setting_bp.route('/', methods=['POST'])
|
||||
@require_auth(roles=['admin'])
|
||||
def create_webhook_setting():
|
||||
"""
|
||||
@@ -87,7 +86,7 @@ def create_webhook_setting():
|
||||
return jsonify(setting.to_dict()), 201
|
||||
|
||||
|
||||
@setting_bp.route('/path/webhook/<int:setting_id>', methods=['PUT', 'PATCH'])
|
||||
@path_webhook_setting_bp.route('/<int:setting_id>', methods=['PUT', 'PATCH'])
|
||||
@require_auth(roles=['admin'])
|
||||
def update_webhook_setting(setting_id):
|
||||
"""
|
||||
@@ -131,7 +130,7 @@ def update_webhook_setting(setting_id):
|
||||
return jsonify(setting.to_dict()), 200
|
||||
|
||||
|
||||
@setting_bp.route('/path/webhook/<int:setting_id>', methods=['DELETE'])
|
||||
@path_webhook_setting_bp.route('/<int:setting_id>', methods=['DELETE'])
|
||||
@require_auth(roles=['admin'])
|
||||
def delete_webhook_setting(setting_id):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user