Adds basic api-key auth in users, need to extract out

This commit is contained in:
Agusti Fernandez Pardo committed 2022-03-28 02:51:40 +02:00
1 parent 0e3131d866
commit 19934d8c3a
5 files changed
+43 -20

No files matched your search

+1 -4
View File
@@ -1,7 +1,4 @@
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] => {
return [key, typeof value === "object" && value instanceof Date ? stringifyISODate(value) : value]
}
// TODO: create a function that takes an object and returns a stringified version of dates of it.