Format all the files
This commit is contained in:
parent
5bff8d99cc
commit
b6773b56c1
22 changed files with 158 additions and 159 deletions
|
@ -9,7 +9,7 @@ import {ServerDatabase} from "@/api/server/types";
|
|||
*/
|
||||
export function createDatabase(server: string, database: string, remote: string): Promise<ServerDatabase> {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.post(route('api.client.servers.databases', { server }), {database, remote})
|
||||
http.post(route('api.client.servers.databases', {server}), {database, remote})
|
||||
.then(response => {
|
||||
const copy: any = response.data.attributes;
|
||||
copy.password = copy.relationships.password.attributes.password;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import http from '../http';
|
||||
import { filter, isObject } from 'lodash';
|
||||
import {filter, isObject} from 'lodash';
|
||||
// @ts-ignore
|
||||
import route from '../../../../../vendor/tightenco/ziggy/src/js/route';
|
||||
import {DirectoryContents} from "./types";
|
||||
|
@ -7,9 +7,9 @@ import {DirectoryContents} from "./types";
|
|||
/**
|
||||
* Get the contents of a specific directory for a given server.
|
||||
*/
|
||||
export function getDirectoryContents (server: string, directory: string): Promise<DirectoryContents> {
|
||||
export function getDirectoryContents(server: string, directory: string): Promise<DirectoryContents> {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.get(route('server.files', { server, directory }))
|
||||
http.get(route('server.files', {server, directory}))
|
||||
.then((response) => {
|
||||
return resolve({
|
||||
files: filter(response.data.contents, function (o) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue