Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Temporizador añadido, mejoras con preguntas automáticas y contador de preguntas #64

Merged
merged 15 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/images/07-Deployment View.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/10_1_Quality_Tree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/DeplymentViewTest.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/04_solution_strategy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ifndef::imagesdir[:imagesdir: ../images]
| _React_ | _JavaScript library that allows us to create interactive user interfaces in a simple way. It is based on components._
| _MongoDB_ | _Open source, document-oriented database system_
| _Docker_ | _A tool that makes it easy to create, deploy and run applications using containers. Containers allow you to package an application with all the parts you need, such as libraries and other dependencies, and deploy it as a single package._
| _API_ | _Se usará una API externa para mostrar el mapa_
| _Wikidata_ | _Website where the information is taken from_
| _Javascript_ | _An interpreted programming language based on prototypes, imperative and dynamic. We will use it on both frontend and backend._
| _CSS_ | _A graphic programming language oriented to define the repesentation of a document._
|===
Expand Down
8 changes: 4 additions & 4 deletions docs/src/05_building_block_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,10 @@ Detailed structure of the system. Focused on the components of the Webapp, Users
|===
| Name | Description

| *_Register / Login_*
| Component to create a new user or log in the system.

| *_Games History_*
| Component to store games played by each user and where user can watch their previous games.

| *_Play New Games_*
| *_Play New Game_*
| Component to create all related to play a new game.

| *_Questions History_*
Expand All @@ -101,6 +98,9 @@ Detailed structure of the system. Focused on the components of the Webapp, Users
| *_Profile_*
| Component to store and manage the user data.

| *_Game_*
| Component to create a new game.

| *_NewQuestion_*
| Component to create new questions for the games.

Expand Down
14 changes: 5 additions & 9 deletions gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ app.get('/health', (_req, res) => {

app.post('/login', async (req, res) => {
try {
// Crea una peticion a la url (le llegará a auth-service.js) con la opcion /login
// y los parametros req.body
const authResponse = await axios.post(authServiceUrl+'/login', req.body);
// Almacena en un Json la respuesta de la anterior peticion
res.json(authResponse.data);
} catch (error) {
res.status(error.response.status).json({ error: error.response.data.error });
Expand All @@ -36,10 +33,7 @@ app.post('/login', async (req, res) => {

app.post('/adduser', async (req, res) => {
try {
// Crea una peticion a la url (le llegará a user-service.js) con la opcion /login
// y los parametros req.body
const userResponse = await axios.post(userServiceUrl+'/adduser', req.body);
// Almacena en un Json la respuesta de la anterior peticion
res.json(userResponse.data);
} catch (error) {
res.status(error.response.status).json({ error: error.response.data.error });
Expand All @@ -48,10 +42,12 @@ app.post('/adduser', async (req, res) => {

app.post('/createquestion', async (req, res) => {
try {
// Crea una peticion a la url (le llegará a creation-service.js) con la opcion /login
// y los parametros req.body
// Create a petition to the URL (le llegará a creation-service.js) with the option /createquestion and the req.body params
console.log("salgo de gateway hacia creation");
const questionResponse = await axios.post(creationServiceUrl+'/createquestion', req.body);
// Almacena en un Json la respuesta de la anterior peticion
console.log("vengo de creation y estoy en gateway");
console.log(questionResponse.status);
// Return a json response with what we obtained on the petition
res.json(questionResponse.data);
} catch (error) {
res.status(error.response.status).json({ error: error.response.data.error });
Expand Down
Loading
Loading