From 204e94aa740236476254c818229bf5e47027a0e1 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 6 Feb 2022 20:48:37 +0100 Subject: [PATCH] chore: programmatically convert filter values to snake_case --- src/helpers/case.js | 4 +++ src/views/tasks/ShowTasks.vue | 49 ++++++++++++++++++----------------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/src/helpers/case.js b/src/helpers/case.js index 6246f7cf..392c7cf3 100644 --- a/src/helpers/case.js +++ b/src/helpers/case.js @@ -45,6 +45,10 @@ export function objectToCamelCase(object) { */ export function objectToSnakeCase(object) { + if (object instanceof Date) { + return object.toISOString() + } + // When calling recursively, this can be called without being and object or array in which case we just return the value if (typeof object !== 'object') { return object diff --git a/src/views/tasks/ShowTasks.vue b/src/views/tasks/ShowTasks.vue index a8ff443d..b0d196c4 100644 --- a/src/views/tasks/ShowTasks.vue +++ b/src/views/tasks/ShowTasks.vue @@ -45,21 +45,22 @@