chore: run prettier
This commit is contained in:
parent
9cdbbc3a00
commit
155d7bb876
76 changed files with 788 additions and 550 deletions
|
@ -1,11 +1,27 @@
|
|||
import http from '@/api/http';
|
||||
import { Database, rawDataToDatabase } from '@/api/admin/databases/getDatabases';
|
||||
|
||||
export default (id: number, name: string, host: string, port: number, username: string, password: string | undefined, include: string[] = []): Promise<Database> => {
|
||||
export default (
|
||||
id: number,
|
||||
name: string,
|
||||
host: string,
|
||||
port: number,
|
||||
username: string,
|
||||
password: string | undefined,
|
||||
include: string[] = [],
|
||||
): Promise<Database> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
http.patch(`/api/application/databases/${id}`, {
|
||||
name, host, port, username, password,
|
||||
}, { params: { include: include.join(',') } })
|
||||
http.patch(
|
||||
`/api/application/databases/${id}`,
|
||||
{
|
||||
name,
|
||||
host,
|
||||
port,
|
||||
username,
|
||||
password,
|
||||
},
|
||||
{ params: { include: include.join(',') } },
|
||||
)
|
||||
.then(({ data }) => resolve(rawDataToDatabase(data)))
|
||||
.catch(reject);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue