mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-27 23:56:18 +00:00
System admin api (#6967)
* [system admin] moved related APIs from seafile-js to system-admin-api.js; made related fixup & improvements, and etc. * [system admin] use 'systemAdminAPI' instead of 'seafileAPI' for the pages * [system admin] use 'systemAdminAPI' instead of 'seafileAPI' for the dialogs
This commit is contained in:
@@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react';
|
||||
import { navigate } from '@gatsbyjs/reach-router';
|
||||
import { Button } from 'reactstrap';
|
||||
import { Utils } from '../../../utils/utils';
|
||||
import { seafileAPI } from '../../../utils/seafile-api';
|
||||
import { systemAdminAPI } from '../../../utils/system-admin-api';
|
||||
import { gettext, siteRoot } from '../../../utils/constants';
|
||||
import toaster from '../../../components/toast';
|
||||
import SysAdminCreateRepoDialog from '../../../components/dialog/sysadmin-dialog/sysadmin-create-repo-dialog';
|
||||
@@ -44,7 +44,7 @@ class AllRepos extends Component {
|
||||
|
||||
getReposByPage = (page) => {
|
||||
const { perPage, sortBy } = this.state;
|
||||
seafileAPI.sysAdminListAllRepos(page, perPage, sortBy).then((res) => {
|
||||
systemAdminAPI.sysAdminListAllRepos(page, perPage, sortBy).then((res) => {
|
||||
this.setState({
|
||||
loading: false,
|
||||
repos: res.data.repos,
|
||||
@@ -83,7 +83,7 @@ class AllRepos extends Component {
|
||||
};
|
||||
|
||||
createRepo = (repoName, Owner) => {
|
||||
seafileAPI.sysAdminCreateRepo(repoName, Owner).then(res => {
|
||||
systemAdminAPI.sysAdminCreateRepo(repoName, Owner).then(res => {
|
||||
this.state.repos.unshift(res.data);
|
||||
this.setState({
|
||||
repos: this.state.repos
|
||||
|
Reference in New Issue
Block a user