Commit 1e3e34f1 authored by Leo Koppelkamm's avatar Leo Koppelkamm

Make backup API RESTful

parent 96fb0f78
......@@ -402,13 +402,13 @@ def backup_status():
from backup import backup_status
return json_response(backup_status(env))
@app.route('/system/backup/get-custom')
@app.route('/system/backup/config', methods=["GET"])
@authorized_personnel_only
def backup_get_custom():
from backup import get_backup_config
return json_response(get_backup_config())
@app.route('/system/backup/set-custom', methods=["POST"])
@app.route('/system/backup/config', methods=["POST"])
@authorized_personnel_only
def backup_set_custom():
from backup import backup_set_custom
......
......@@ -138,7 +138,7 @@ function show_system_backup() {
function show_custom_backup() {
api(
"/system/backup/get-custom",
"/system/backup/custom",
"GET",
{ },
function(r) {
......@@ -158,7 +158,7 @@ function set_custom_backup() {
var target_pass = $("#target-pass").val();
var max_age = $("#max-age").val();
api(
"/system/backup/set-custom",
"/system/backup/custom",
"POST",
{
target: target,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment