Skip to content

Commit bbe1605

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

File tree

1 file changed

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

1 file changed

+4
-6
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,12 @@ export class PostApiService implements Service {
137137
throw error
138138
}
139139

140-
try {
141-
await Promise.all([
140+
setTimeout(() => {
141+
Promise.all([
142142
data.is_temp ? null : this.searchService.searchSync.update(post.id),
143143
this.graphcdn.purgePost(post.id),
144-
])
145-
} catch (error) {
146-
console.error(error)
147-
}
144+
]).catch(console.error)
145+
})
148146

149147
if (!post.is_private && data.is_private) {
150148
setTimeout(async () => {

0 commit comments

Comments
 (0)