mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Move files request to files API
This commit is contained in:
parent
1ff9bc9e83
commit
768d3c0d14
@ -32,8 +32,8 @@ from app.classes.web.routes.api.servers.server.backups.index import (
|
||||
from app.classes.web.routes.api.servers.server.backups.backup.index import (
|
||||
ApiServersServerBackupsBackupIndexHandler,
|
||||
)
|
||||
from app.classes.web.routes.api.servers.server.backups.files import (
|
||||
ApiServersServerBackupsFilesIndexHandler,
|
||||
from app.classes.web.routes.api.servers.server.files import (
|
||||
ApiServersServerFilesIndexHandler,
|
||||
)
|
||||
from app.classes.web.routes.api.servers.server.tasks.task.children import (
|
||||
ApiServersServerTasksTaskChildrenHandler,
|
||||
@ -132,8 +132,8 @@ def api_handlers(handler_args):
|
||||
handler_args,
|
||||
),
|
||||
(
|
||||
r"/api/v2/servers/([0-9]+)/backups/files/?",
|
||||
ApiServersServerBackupsFilesIndexHandler,
|
||||
r"/api/v2/servers/([0-9]+)/files/?",
|
||||
ApiServersServerFilesIndexHandler,
|
||||
handler_args,
|
||||
),
|
||||
(
|
||||
|
@ -21,7 +21,7 @@ files_get_schema = {
|
||||
}
|
||||
|
||||
|
||||
class ApiServersServerBackupsFilesIndexHandler(BaseApiHandler):
|
||||
class ApiServersServerFilesIndexHandler(BaseApiHandler):
|
||||
def post(self, server_id: str):
|
||||
auth_data = self.authenticate_user()
|
||||
if not auth_data:
|
@ -588,7 +588,7 @@
|
||||
}
|
||||
async function getTreeView(path){
|
||||
var token = getCookie("_xsrf");
|
||||
let res = await fetch(`/api/v2/servers/${server_id}/backups/files`, {
|
||||
let res = await fetch(`/api/v2/servers/${server_id}/files`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-XSRFToken': token
|
||||
|
Loading…
Reference in New Issue
Block a user