feat: adds availabilitesi and attendees endpoints, some cleanup less try/catch more if/else

This commit is contained in:
Agusti Fernandez Pardo committed 2022-03-27 00:58:22 +01:00
1 parent ac307f7161
commit 936572e7e1
48 files changed
+1365 -172

No files matched your search

+1 -2
View File
@@ -1,8 +1,7 @@
export const stringifyISODate = (date: Date|undefined): string => {
return `${date?.toISOString()}`
}
// FIXME: debug this, supposed to take an array/object and auto strinfy date-like values
export const autoStringifyDateValues = ([key, value]: [string, unknown]): [string, unknown] => {
console.log(key,value)
return [key, typeof value === "object" && value instanceof Date ? stringifyISODate(value) : value]
}