fix: search posts with category

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2023-04-30 10:16:23 +08:00
parent e31b6ea8f2
commit 71f20e3c7a

View File

@@ -147,7 +147,10 @@ export class SearchService {
return model
.findById(objectID)
.select('_id title created modified categoryId slug nid')
.lean()
.lean({
getters: true,
autopopulate: true,
})
.then((doc) => {
if (doc) {
Reflect.set(doc, 'type', type)