mirror of https://github.com/fantasticit/think.git
server: order docs
parent
287fdb3a66
commit
73deb5e54e
|
@ -563,6 +563,8 @@ export class DocumentService {
|
|||
return lodash.omit(item, ['content', 'state']);
|
||||
});
|
||||
|
||||
docs.sort((a, b) => a.index - b.index);
|
||||
|
||||
// const docsWithCreateUser = await Promise.all(
|
||||
// docs.map(async (doc) => {
|
||||
// const createUser = await this.userService.findById(doc.createUserId);
|
||||
|
@ -617,6 +619,8 @@ export class DocumentService {
|
|||
return lodash.omit(item, ['content', 'state']);
|
||||
});
|
||||
|
||||
docs.sort((a, b) => a.index - b.index);
|
||||
|
||||
// const docsWithCreateUser = await Promise.all(
|
||||
// docs.map(async (doc) => {
|
||||
// const createUser = await this.userService.findById(doc.createUserId);
|
||||
|
|
|
@ -622,6 +622,8 @@ export class WikiService {
|
|||
return lodash.omit(item, ['content', 'state']);
|
||||
});
|
||||
|
||||
docs.sort((a, b) => a.index - b.index);
|
||||
|
||||
const docsWithCreateUser = await Promise.all(
|
||||
docs.map(async (doc) => {
|
||||
const createUser = await this.userService.findById(doc.createUserId);
|
||||
|
|
Loading…
Reference in New Issue