rebranding to forum, adding settings and stripe page

This commit is contained in:
metacryst
2026-02-20 03:51:31 -06:00
parent aaf9d56b1b
commit dd9552aad1
19 changed files with 113 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
import fs from 'fs/promises';
import chalk from 'chalk';
import path from 'path';
import {nodeModels, edgeModels} from './model/import.js'
import { nodeModels, edgeModels } from './model/import.js'
import Edge from "./model/edge.js"
import { fileURLToPath } from "url"
const __dirname = path.dirname(fileURLToPath(import.meta.url))

View File

@@ -46,7 +46,12 @@ export default class Socket {
const cookies = parseCookies(req.headers.cookie);
const token = cookies.auth_token;
if (!token) throw new Error("No auth token");
const payload = jwt.verify(token, process.env.JWT_SECRET);
let payload;
try {
payload = jwt.verify(token, process.env.JWT_SECRET);
} catch(e) {
console.error("error: jwt is expired ", e)
}
ws.userEmail = payload.email;
ws.on('message', (msg) => {