mirror of
https://github.com/fantasticit/think.git
synced 2026-10-30 22:56:06 +08:00
server: order docs
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user