feat: update package dependencies and improve invitation expiry date formatting

This commit is contained in:
Raj Nandan Sharma
2025-03-24 10:17:21 +05:30
parent eb128ad431
commit 7875192fb0
4 changed files with 8 additions and 7 deletions

6
package-lock.json generated
View File

@@ -9,6 +9,7 @@
"version": "3.2.5",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.26.10",
"@codemirror/lang-javascript": "^6.2.3",
"@codemirror/lang-json": "^6.0.1",
"@formkit/auto-animate": "^0.8.2",
@@ -39,6 +40,7 @@
"mode-watcher": "^0.4.1",
"moment": "^2.29.4",
"moment-timezone": "^0.5.43",
"mustache": "^4.2.0",
"mysql2": "^3.12.0",
"node-cache": "^5.1.2",
"nodemailer": "^6.10.0",
@@ -65,7 +67,6 @@
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"date-picker-svelte": "^2.15.1",
"mustache": "^4.2.0",
"postcss": "^8.4.24",
"postcss-load-config": "^4.0.1",
"prettier": "^3.2.5",
@@ -184,7 +185,6 @@
"version": "7.26.10",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz",
"integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==",
"dev": true,
"license": "MIT",
"dependencies": {
"regenerator-runtime": "^0.14.0"
@@ -5300,7 +5300,6 @@
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz",
"integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==",
"dev": true,
"license": "MIT",
"bin": {
"mustache": "bin/mustache"
@@ -6818,7 +6817,6 @@
"version": "0.14.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
"integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
"dev": true,
"license": "MIT"
},
"node_modules/regexp.prototype.flags": {

View File

@@ -52,7 +52,6 @@
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"date-picker-svelte": "^2.15.1",
"mustache": "^4.2.0",
"postcss": "^8.4.24",
"postcss-load-config": "^4.0.1",
"prettier": "^3.2.5",
@@ -68,6 +67,7 @@
},
"type": "module",
"dependencies": {
"@babel/runtime": "^7.26.10",
"@codemirror/lang-javascript": "^6.2.3",
"@codemirror/lang-json": "^6.0.1",
"@formkit/auto-animate": "^0.8.2",
@@ -98,6 +98,7 @@
"mode-watcher": "^0.4.1",
"moment": "^2.29.4",
"moment-timezone": "^0.5.43",
"mustache": "^4.2.0",
"mysql2": "^3.12.0",
"node-cache": "^5.1.2",
"nodemailer": "^6.10.0",

View File

@@ -142,7 +142,7 @@
</header>
<main class="manage">
<div class="container my-4 max-w-6xl">
<nav class="flex justify-start gap-x-2">
<nav class="flex justify-start gap-x-2 overflow-x-auto">
{#each nav as item}
<Button variant={item.id.includes(activeTab) ? "secondary" : "ghost"} href={item.url} class="flex-1r"
>{item.name}</Button

View File

@@ -5,6 +5,7 @@ import notification from "$lib/server/notification/notif.js";
import Service from "$lib/server/services/service.js";
import verifyEmailTemplate from "$lib/server/templates/verify_email_template.html?raw";
import { base } from "$app/paths";
import { format } from "date-fns";
import {
CreateUpdateMonitor,
@@ -120,7 +121,8 @@ export async function POST({ request, cookies }) {
});
//create timestamp with 1 hour expiry
const expiryTimestamp = GetNowTimestampUTC() + 3600;
data.invitation_expiry = new Date(expiryTimestamp * 1000).toISOString();
const expiryDate = new Date(expiryTimestamp * 1000);
data.invitation_expiry = format(expiryDate, "yyyy-MM-dd HH:mm:ss");
resp = await CreateNewInvitation(data);
let token = resp.invitation_token;