feat: Typescript for API layer (#817)
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com> Co-authored-by: Zakaria El Asri <33696020+zakariaelas@users.noreply.github.com> Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com> Co-authored-by: Philip Korsholm <philip.korsholm@hotmail.com> Co-authored-by: Sebastian Rindom <seb@medusa-commerce.com>
This commit is contained in:
committed by
GitHub
parent
55e200bf68
commit
373532ecbc
2
packages/medusa/src/utils/validators/date-transform.ts
Normal file
2
packages/medusa/src/utils/validators/date-transform.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export const transformDate = ({ value }): Date =>
|
||||
!isNaN(Date.parse(value)) ? new Date(value) : new Date(Number(value) * 1000)
|
||||
Reference in New Issue
Block a user