Skip to content

Commit 16238ba

Browse files
committed
feat: Update search sync for non-temporary posts
1 parent 6d5a6fa commit 16238ba

File tree

1 file changed

+4
-3
lines changed
  • apps/server/src/services/PostApiService

1 file changed

+4
-3
lines changed

apps/server/src/services/PostApiService/index.mts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ export class PostApiService implements Service {
6969
await this.seriesService.appendToSeries(series_id, post.id)
7070
}
7171

72-
if (!data.is_temp) {
73-
await this.searchService.searchSync.update(post.id)
74-
}
72+
setTimeout(() => {
73+
if (data.is_temp) return
74+
this.searchService.searchSync.update(post.id).catch(console.error)
75+
})
7576

7677
return post
7778
}

0 commit comments

Comments
 (0)