Skip to content

Commit 2bdca58

Browse files
committed
refactor: updatePostScore method in PostService
1 parent 0966092 commit 2bdca58

File tree

1 file changed

+10
-8
lines changed
  • packages/velog-server/src/services/PostService

1 file changed

+10
-8
lines changed

packages/velog-server/src/services/PostService/index.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,17 @@ export class PostService implements Service {
403403
}
404404
}
405405
public async updatePostScore(postId: string) {
406-
await axios.patch(
407-
`${ENV.cronHost}/api/posts/v1/score/${postId}`,
408-
{},
409-
{
410-
headers: {
411-
'Cron-Api-Key': ENV.cronApiKey,
406+
try {
407+
await axios.patch(
408+
`${ENV.cronHost}/api/posts/v1/score/${postId}`,
409+
{},
410+
{
411+
headers: {
412+
'Cron-Api-Key': ENV.cronApiKey,
413+
},
412414
},
413-
},
414-
)
415+
)
416+
} catch (_) {}
415417
}
416418
public shortDescription(post: Post): string {
417419
if (post.short_description) return post.short_description

0 commit comments

Comments
 (0)