hhhhhnnn mimimimimimimimi
This commit is contained in:
parent
0114214995
commit
441f00507d
4 changed files with 68 additions and 9 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue