From 2fca92c61570bfa1bbc430741288c18e6a7af26c Mon Sep 17 00:00:00 2001 From: buzzcode2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Fri, 11 Apr 2025 01:15:35 +0000 Subject: [PATCH] Reorient the order of the JSON keys for responses --- scripts/response/activity.JS | 5 ++--- scripts/response/log.JS | 8 +++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/response/activity.JS b/scripts/response/activity.JS index bb5e349..4d35670 100644 --- a/scripts/response/activity.JS +++ b/scripts/response/activity.JS @@ -8,11 +8,11 @@ class Activity extends DBParser { */ constructor(ENTRY) { super(ENTRY, { - "_id": "ID", "username": "username", "description": "description", "duration": "duration", - "date": "date" + "date": "date", + "_id": "ID" }); this.convert_date(); @@ -27,7 +27,6 @@ class Activity extends DBParser { convert_date(DATE) { if (DATE || this.data.date) { this.date = (new Date(DATE || this.data.date)).toDateString(); - return (this.date); } } diff --git a/scripts/response/log.JS b/scripts/response/log.JS index cb8b42d..cea644b 100644 --- a/scripts/response/log.JS +++ b/scripts/response/log.JS @@ -1,6 +1,6 @@ const DBParser = require(`./parser.JS`) -DBParser.Log = class Log extends DBParser { +class Log extends DBParser { /* Clean the log information. @@ -8,10 +8,12 @@ DBParser.Log = class Log extends DBParser { */ constructor(ENTRY) { super(ENTRY, { - "_id": "ID", "username": "name", "count": "count", + "_id": "ID", "log": "activities" }); }; -} \ No newline at end of file +} + +module.exports = Log; \ No newline at end of file