mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
Replace getDefaultApplication() with getUserApplication().
This commit is contained in:
@ -49,7 +49,7 @@ class UserEditPage extends React.Component {
|
||||
UNSAFE_componentWillMount() {
|
||||
this.getUser();
|
||||
this.getOrganizations();
|
||||
this.getDefaultApplication();
|
||||
this.getUserApplication();
|
||||
}
|
||||
|
||||
getUser() {
|
||||
@ -70,8 +70,8 @@ class UserEditPage extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
getDefaultApplication() {
|
||||
ApplicationBackend.getDefaultApplication("admin")
|
||||
getUserApplication() {
|
||||
ApplicationBackend.getUserApplication(this.state.organizationName, this.state.userName)
|
||||
.then((application) => {
|
||||
this.setState({
|
||||
application: application,
|
||||
|
@ -28,8 +28,8 @@ export function getApplication(owner, name) {
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getDefaultApplication(owner) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-default-application?owner=${owner}`, {
|
||||
export function getUserApplication(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-user-application?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
}).then(res => res.json());
|
||||
|
Reference in New Issue
Block a user