feat(api): accept releasedAt date on version update

This commit is contained in:
Lars Hampe 2024-10-10 22:05:49 +02:00
parent 5cfb15886f
commit 3aea656943

View File

@ -63,7 +63,7 @@ export const updateFunc = async ({
.set({
status: payload.status,
markdown: payload.markdown,
releasedAt: payload.status === 'published' ? new Date() : null,
releasedAt: payload.releasedAt ? new Date(payload.releasedAt) : null,
})
.where(and(eq(changelog_version.id, id)))
.returning()