Add support for backfillips
This commit is contained in:
@ -9,6 +9,7 @@ from flask import jsonify
|
||||
from hsapi_client import Node, User, Route, PreAuthKey
|
||||
from hsapi_client.preauthkeys import (v1CreatePreAuthKeyRequest,
|
||||
v1ExpirePreAuthKeyRequest)
|
||||
from hsapi_client.nodes import v1BackfillNodeIPsResponse
|
||||
|
||||
|
||||
log = logging.getLogger()
|
||||
@ -104,3 +105,10 @@ def expirePKA(userName: str, key: str):
|
||||
|
||||
PreAuthKey().expire(req)
|
||||
return redirect(url_for('main.user', userName=userName))
|
||||
|
||||
|
||||
@rest_blueprint.route('/backfillips', methods=['POST'])
|
||||
@auth.authorize_admins('default')
|
||||
def backfillips():
|
||||
response = Node().backfillips()
|
||||
return jsonify(response.changes)
|
||||
|
Reference in New Issue
Block a user