Add Link API.

This commit is contained in:
Yang Luo
2021-04-19 01:14:41 +08:00
parent 6774b0379c
commit 36895801f0
14 changed files with 143 additions and 43 deletions

View File

@ -28,6 +28,13 @@ export function getApplication(owner, name) {
}).then(res => res.json());
}
export function getDefaultApplication(owner) {
return fetch(`${Setting.ServerUrl}/api/get-default-application?owner=${owner}`, {
method: "GET",
credentials: "include"
}).then(res => res.json());
}
export function updateApplication(owner, name, application) {
let newApplication = Setting.deepCopy(application);
return fetch(`${Setting.ServerUrl}/api/update-application?id=${owner}/${encodeURIComponent(name)}`, {

View File

@ -21,6 +21,13 @@ export function getProviders(owner) {
}).then(res => res.json());
}
export function getDefaultProviders(owner) {
return fetch(`${Setting.ServerUrl}/api/get-default-providers?owner=${owner}`, {
method: "GET",
credentials: "include"
}).then(res => res.json());
}
export function getProvider(owner, name) {
return fetch(`${Setting.ServerUrl}/api/get-provider?id=${owner}/${encodeURIComponent(name)}`, {
method: "GET",