refactor login page, change routes to token-based, add service classes

This commit is contained in:
2025-06-17 16:19:22 +02:00
parent 6d3e6ad047
commit 34f8fd5490
36 changed files with 405 additions and 305 deletions

10
src/lib/helper/getCode.ts Normal file
View File

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