ENCOA-228 Now when user navigates between modules the generation items persist. Reading, listening and writing added to level module

This commit is contained in:
Carlos-Mesquita
2024-11-12 14:17:54 +00:00
parent 696c968ebc
commit fdf411d133
66 changed files with 2546 additions and 1635 deletions

View File

@@ -32,8 +32,13 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
const queryParams = queryToURLSearchParams(req);
let endpoint = queryParams.getAll('module').join("/");
if (endpoint.startsWith("level")) {
endpoint = "level/"
} else if (endpoint.startsWith("listening")) {
endpoint = "listening/"
} else if (endpoint.startsWith("reading")) {
endpoint = "reading/"
}
const result = await axios.post(`${process.env.BACKEND_URL}/${endpoint}`,