add timezone notice to home page, change list to give different response for lastUpdated

This commit is contained in:
Ean Milligan
2026-04-21 12:44:26 -04:00
parent 52477c3bd3
commit 5c629b1263
2 changed files with 5 additions and 0 deletions

4
mod.ts
View File

@@ -72,6 +72,10 @@ Deno.serve({ port: config.api.port }, async (req) => {
});
if (failed) return genericResponse(STATUS_CODE.InternalServerError, "Couldn't read DB.");
for (const plan of plans) {
plan.lastUpdated = plan.lastUpdated.getTime();
}
return genericResponse(STATUS_CODE.OK, JSON.stringify(plans));
} else if (path.startsWith('/export/')) {
const userId = path.replace('/export/', '');

View File

@@ -69,6 +69,7 @@ catch (error){prompt('Failed to copy to clipboard, please select and copy the li
</script>
<p>This is a very basic management page. Please excuse the number of alert/prompts that will come up when you click on things as it was the quickest way to build it out.</p>
<p>Please note: anything modifying data will require you to enter your PIN again as both the web view you are looking at and server behind it are completely stateless for simplicity.</p>
<p>DateTimeStamps on this page are all displayed in the US Eastern time zone. I don't care enough to make this extremely basic page dynamic.</p>
<h3>${userName}'s Plans:</h3>
<button onclick="exportPlans()" disabled style="color:black;cursor:not-allowed;">WIP: export all plans</button>
<ul>