1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-11 11:51:27 +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:
llj
2024-10-30 08:48:04 +08:00
committed by GitHub
parent 23ac76bc3f
commit 801b473b5d
78 changed files with 1363 additions and 306 deletions

View File

@@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import { Link } from '@gatsbyjs/reach-router';
import { Utils } from '../../../utils/utils';
import { seafileAPI } from '../../../utils/seafile-api';
import { systemAdminAPI } from '../../../utils/system-admin-api';
import { gettext, siteRoot, isPro } from '../../../utils/constants';
import toaster from '../../../components/toast';
import EmptyTip from '../../../components/empty-tip';
@@ -152,7 +152,7 @@ class Item extends Component {
}
onDeleteRepo = (repo) => {
seafileAPI.sysAdminDeleteRepo(repo.id).then((res) => {
systemAdminAPI.sysAdminDeleteRepo(repo.id).then((res) => {
this.props.onDeleteRepo(repo);
this.setState({
isDeleteDialogOpen: false,
@@ -169,7 +169,7 @@ class Item extends Component {
};
onTransferRepo = (owner) => {
seafileAPI.sysAdminTransferRepo(this.props.repo.id, owner.email).then((res) => {
systemAdminAPI.sysAdminTransferRepo(this.props.repo.id, owner.email).then((res) => {
this.props.onTransferRepo(res.data);
let message = gettext('Successfully transferred the library.');
toaster.success(message);