3 Commits

Author SHA1 Message Date
db1cc78f2c move ´code´ api endpoint to ´casepw´
Some checks failed
InnoHub Processor/tatort/pipeline/head There was a failure building this commit
2025-07-23 12:54:40 +02:00
e8170de947 rename .js to .ts and remove console.logs statements 2025-07-23 09:27:11 +02:00
26c05b4999 remove unused and deprecated crypto package 2025-07-22 12:27:50 +02:00
5 changed files with 3 additions and 12 deletions

View File

@@ -14,7 +14,7 @@
"lint": "prettier --check . && eslint .",
"test:unit": "vitest",
"test": "npm run test:unit -- --run && npm run test:e2e",
"init_db": "node src/init/init_db.js"
"init_db": "npx vite-node src/init/init_db.ts"
},
"devDependencies": {
"@eslint/compat": "^1.2.9",
@@ -46,7 +46,6 @@
"@tailwindcss/forms": "^0.5.10",
"autoprefixer": "^10.4.21",
"better-sqlite3": "^12.2.0",
"crypto": "^1.0.1",
"jsonwebtoken": "^9.0.2",
"jssha": "^3.3.1",
"minio": "^8.0.5",

View File

@@ -20,10 +20,6 @@ db.exec(checkInsertSQLStmt);
let usersSQLStmt = `SELECT * FROM USERS`;
let SQLStatement = db.prepare(usersSQLStmt);
console.log(`\n`, `*** Users table`);
for (const usr of SQLStatement.iterate()) {
console.log(`[r] ${usr.name} + ${usr.pw}`);
}
// cases table
@@ -37,9 +33,5 @@ db.exec(createSQLStmt);
let casesSQLStmt = `SELECT * FROM cases`;
SQLStatement = db.prepare(casesSQLStmt);
console.log(`\n`, `*** Cases table`);
for (const usr of SQLStatement.iterate()) {
console.log(`[r] ${usr.name} + ${usr.token} + ${usr.pw}`);
}
db.close();

View File

@@ -1,5 +1,5 @@
export default async function get_code(case_no) {
let url = `/api/list/${case_no}/code`;
let url = `/api/list/${case_no}/casepw`;
const response = await fetch(url);
if (response.status == 200) {

View File

@@ -181,7 +181,7 @@
if (caseName == '') return;
let url = `/api/list/${caseName}/code`;
let url = `/api/list/${caseName}/casepw`;
const response = await fetch(url);
if (response.status == 200) {