You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/bazarr/api/system/system.py

19 lines
411 B

# coding=utf-8
from flask import request
from flask_restful import Resource
from ..utils import authenticate
class System(Resource):
@authenticate
def post(self):
from server import webserver
action = request.args.get('action')
if action == "shutdown":
webserver.shutdown()
elif action == "restart":
webserver.restart()
return '', 204