1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-12-22 07:17:05 +00:00

Make backup API RESTful

This commit is contained in:
Leo Koppelkamm 2015-07-27 22:00:36 +02:00
parent 96fb0f78f7
commit 1e3e34f15f
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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,