mirror of https://github.com/fantasticit/think.git
Merge pull request #136 from fantasticit/fix/search
This commit is contained in:
commit
94836d49fa
|
@ -701,6 +701,7 @@ export class DocumentService {
|
||||||
* @param keyword
|
* @param keyword
|
||||||
*/
|
*/
|
||||||
async search(user, organizationId, keyword) {
|
async search(user, organizationId, keyword) {
|
||||||
|
const userId = user.id;
|
||||||
const res = await this.documentRepo
|
const res = await this.documentRepo
|
||||||
.createQueryBuilder('document')
|
.createQueryBuilder('document')
|
||||||
.andWhere('document.organizationId = :organizationId')
|
.andWhere('document.organizationId = :organizationId')
|
||||||
|
@ -712,7 +713,7 @@ export class DocumentService {
|
||||||
|
|
||||||
const ret = await Promise.all(
|
const ret = await Promise.all(
|
||||||
res.map(async (doc) => {
|
res.map(async (doc) => {
|
||||||
const auth = await this.authService.getAuth(user.Id, {
|
const auth = await this.authService.getAuth(userId, {
|
||||||
organizationId: doc.organizationId,
|
organizationId: doc.organizationId,
|
||||||
wikiId: doc.wikiId,
|
wikiId: doc.wikiId,
|
||||||
documentId: doc.id,
|
documentId: doc.id,
|
||||||
|
|
Loading…
Reference in New Issue