mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-15 23:00:57 +00:00
improve list-group api (#2785)
This commit is contained in:
@@ -44,7 +44,7 @@ class MainSideNav extends React.Component {
|
|||||||
|
|
||||||
loadGroups = () => {
|
loadGroups = () => {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
seafileAPI.listGroupsV2().then(res =>{
|
seafileAPI.listGroups().then(res =>{
|
||||||
let groupList = res.data.map(item => {
|
let groupList = res.data.map(item => {
|
||||||
let group = new Group(item);
|
let group = new Group(item);
|
||||||
return group;
|
return group;
|
||||||
|
@@ -8,9 +8,7 @@ class Group {
|
|||||||
this.created_at = object.created_at;
|
this.created_at = object.created_at;
|
||||||
this.parent_group_id = object.parent_group_id;
|
this.parent_group_id = object.parent_group_id;
|
||||||
this.wiki_enabled = object.wiki_enabled;
|
this.wiki_enabled = object.wiki_enabled;
|
||||||
if (object.repos) {
|
this.repos = object.repos || [];
|
||||||
this.repos = object.repos;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -99,7 +99,7 @@ class GroupsView extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
listGroups = () => {
|
listGroups = () => {
|
||||||
seafileAPI.listGroupsV2({'with_repos': 1}).then((res) => { // TODO: api name
|
seafileAPI.listGroups(true).then((res) => {
|
||||||
// `{'with_repos': 1}`: list repos of every group
|
// `{'with_repos': 1}`: list repos of every group
|
||||||
// res: {data: [...], status: 200, statusText: "OK", headers: {…}, config: {…}, …}
|
// res: {data: [...], status: 200, statusText: "OK", headers: {…}, config: {…}, …}
|
||||||
let groupList = res.data.map(item => {
|
let groupList = res.data.map(item => {
|
||||||
|
Reference in New Issue
Block a user