Merge pull request #136 from fantasticit/fix/search

This commit is contained in:
fantasticit 2022-07-26 09:27:24 +08:00 committed by GitHub
commit 94836d49fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -701,6 +701,7 @@ export class DocumentService {
* @param keyword
*/
async search(user, organizationId, keyword) {
const userId = user.id;
const res = await this.documentRepo
.createQueryBuilder('document')
.andWhere('document.organizationId = :organizationId')
@ -712,7 +713,7 @@ export class DocumentService {
const ret = await Promise.all(
res.map(async (doc) => {
const auth = await this.authService.getAuth(user.Id, {
const auth = await this.authService.getAuth(userId, {
organizationId: doc.organizationId,
wikiId: doc.wikiId,
documentId: doc.id,