Skip to content

Commit 627c8cf

Browse files
committed
feat: add created_at timestamp when creating a new article
1 parent af4d1cf commit 627c8cf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/backend/services/article.actions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export async function createMyArticle(
4949
body: input.body ?? null,
5050
cover_image: input.cover_image ?? null,
5151
published_at: input.is_published ? new Date() : null,
52+
created_at: new Date(),
5253
author_id: sessionUserId,
5354
approved_at: new Date(), // TODO: manually handle this from seperate dashboard
5455
},

0 commit comments

Comments
 (0)