mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-05 05:50:19 +08:00
Add Link API.
This commit is contained in:
@ -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)}`, {
|
||||
|
@ -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",
|
||||
|
Reference in New Issue
Block a user