Updated the code so the user levels update depending on their performance

This commit is contained in:
Tiago Ribeiro
2023-07-04 21:03:36 +01:00
parent 49e24865a3
commit ce90de1b74
6 changed files with 108 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ import {Module} from "@/interfaces";
import ProgressBar from "@/components/Low/ProgressBar";
import Layout from "@/components/High/Layout";
import {calculateAverageLevel} from "@/utils/score";
import axios from "axios";
export const getServerSideProps = withIronSessionSsr(({req, res}) => {
const user = req.session.user;