mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-26 02:57:04 +00:00
Make backup API RESTful
This commit is contained in:
parent
96fb0f78f7
commit
1e3e34f15f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user