hhhhhnnn mimimimimimimimi

This commit is contained in:
Guillem George 2026-05-15 22:33:21 +02:00
parent 0114214995
commit 441f00507d
4 changed files with 68 additions and 9 deletions

View file

@ -1,7 +1,7 @@
import $ from "jquery";
import jwt_decode from "jwt-decode";
import { createAlert } from "../../utils/notify";
import {authedAPIRequest} from "../../utils/auth"
import { authedAPIRequest } from "../../utils/auth";
export async function displayStudentProfile() {
const token = localStorage.getItem("token");
@ -10,7 +10,9 @@ export async function displayStudentProfile() {
const _uid = decoded.uid;
// You have to write a request to fetch your informations
const request_result = await authedAPIRequest(`/students/${_uid}`, {method: "GET"});
const request_result = await authedAPIRequest(`/students/${_uid}`, {
method: "GET",
});
if (request_result === null) {
createAlert(

View file

@ -1,6 +1,16 @@
// FIXME: This is the entry point of the application, write your code here
import { initSocket } from "../utils/streams";
import { calculateLayout } from "./utils";
import { authenticate } from "../utils/auth";
// Initialize the layout
calculateLayout();
async () => {
// ? Not sure
if (!(await authenticate())) {
return;
}
initSocket();
// subscribe()
};