1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-21 19:37:28 +00:00

modify sysadmin org api name (#4180)

This commit is contained in:
Leo
2019-10-23 15:25:52 +08:00
committed by Daniel Pan
parent 685e0e0a23
commit 1b5481c15f
5 changed files with 13 additions and 13 deletions

View File

@@ -134,12 +134,12 @@ class OrgGroups extends Component {
}
componentDidMount () {
seafileAPI.sysAdminGetOrgInfo(this.props.orgID).then((res) => {
seafileAPI.sysAdminGetOrg(this.props.orgID).then((res) => {
this.setState({
orgName: res.data.org_name
});
});
seafileAPI.sysAdminListAllOrgGroups(this.props.orgID).then((res) => {
seafileAPI.sysAdminListOrgGroups(this.props.orgID).then((res) => {
this.setState({
loading: false,
groupList: res.data.group_list

View File

@@ -121,7 +121,7 @@ class OrgInfo extends Component {
}
componentDidMount () {
seafileAPI.sysAdminGetOrgInfo(this.props.orgID).then((res) => {
seafileAPI.sysAdminGetOrg(this.props.orgID).then((res) => {
this.setState({
loading: false,
orgInfo: res.data
@@ -151,7 +151,7 @@ class OrgInfo extends Component {
updateQuota = (quota) => {
const data = {quota: quota};
seafileAPI.sysAdminUpdateOrgInfo(this.props.orgID, data).then(res => {
seafileAPI.sysAdminUpdateOrg(this.props.orgID, data).then(res => {
const newOrgInfo = Object.assign(this.state.orgInfo, {
quota: res.data.quota
});
@@ -165,7 +165,7 @@ class OrgInfo extends Component {
updateName = (orgName) => {
const data = {orgName: orgName};
seafileAPI.sysAdminUpdateOrgInfo(this.props.orgID, data).then(res => {
seafileAPI.sysAdminUpdateOrg(this.props.orgID, data).then(res => {
const newOrgInfo = Object.assign(this.state.orgInfo, {
org_name: res.data.org_name
});
@@ -179,7 +179,7 @@ class OrgInfo extends Component {
updateMaxUserNumber = (newValue) => {
const data = {maxUserNumber: newValue};
seafileAPI.sysAdminUpdateOrgInfo(this.props.orgID, data).then(res => {
seafileAPI.sysAdminUpdateOrg(this.props.orgID, data).then(res => {
const newOrgInfo = Object.assign(this.state.orgInfo, {
max_user_number: res.data.max_user_number
});

View File

@@ -138,12 +138,12 @@ class OrgRepos extends Component {
}
componentDidMount () {
seafileAPI.sysAdminGetOrgInfo(this.props.orgID).then((res) => {
seafileAPI.sysAdminGetOrg(this.props.orgID).then((res) => {
this.setState({
orgName: res.data.org_name
});
});
seafileAPI.sysAdminListAllOrgRepos(this.props.orgID).then((res) => {
seafileAPI.sysAdminListOrgRepos(this.props.orgID).then((res) => {
this.setState({
loading: false,
repoList: res.data.repo_list

View File

@@ -231,12 +231,12 @@ class OrgUsers extends Component {
}
componentDidMount () {
seafileAPI.sysAdminGetOrgInfo(this.props.orgID).then((res) => {
seafileAPI.sysAdminGetOrg(this.props.orgID).then((res) => {
this.setState({
orgName: res.data.org_name
});
});
seafileAPI.sysAdminListAllOrgUsers(this.props.orgID).then((res) => {
seafileAPI.sysAdminListOrgUsers(this.props.orgID).then((res) => {
this.setState({
loading: false,
userList: res.data.users
@@ -295,7 +295,7 @@ class OrgUsers extends Component {
updateStatus = (email, statusValue) => {
const isActive = statusValue == 'active';
seafileAPI.sysAdminUpdateOrgUserInfo(this.props.orgID, email, 'active', isActive).then(res => {
seafileAPI.sysAdminUpdateOrgUser(this.props.orgID, email, 'active', isActive).then(res => {
let newUserList = this.state.userList.map(item => {
if (item.email == email) {
item.active = res.data.active;

View File

@@ -150,7 +150,7 @@ class Orgs extends Component {
}
componentDidMount () {
seafileAPI.sysAdminListAllOrgs().then((res) => {
seafileAPI.sysAdminListOrgs().then((res) => {
this.setState({
loading: false,
orgList: res.data.organizations
@@ -185,7 +185,7 @@ class Orgs extends Component {
updateRole = (orgID, role) => {
let orgInfo = {};
orgInfo.role = role;
seafileAPI.sysAdminUpdateOrgInfo(orgID, orgInfo).then(res => {
seafileAPI.sysAdminUpdateOrg(orgID, orgInfo).then(res => {
let newOrgList = this.state.orgList.map(org => {
if (org.org_id == orgID) {
org.role = role;