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:
@@ -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
|
||||
|
@@ -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
|
||||
});
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user