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

Actualizada rama #129

Merged
merged 59 commits into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
913093e
api usuarios
angeeroza Apr 6, 2024
ad08a6b
perfil d usuario
angeeroza Apr 8, 2024
3cd3be9
Merge remote-tracking branch 'origin' into development-angela
angeeroza Apr 8, 2024
00e36ba
Merge pull request #113 from Arquisoft/Implementation-David
uo289792 Apr 9, 2024
f3aa0cd
Añadido por error archivo obsoleto
uo289792 Apr 9, 2024
a2fd436
Solución bug registro sin contraseña + añadidos requisitos en email y…
UO288559 Apr 9, 2024
3660242
Merge pull request #115 from Arquisoft/Marina
UO288559 Apr 9, 2024
d9d81e5
Añadida pantalla para configurar los parámetros.
UO288559 Apr 9, 2024
19454ce
Merge pull request #117 from Arquisoft/Implementation-David
uo289792 Apr 9, 2024
610e76f
Añadido el endPoint para modificar el número de preguntas de la partida.
UO288559 Apr 9, 2024
6e6fd09
Paso de valores a Game.js y llamada al endpoint
UO288559 Apr 9, 2024
d5337bf
Eliminados console.logs de depuración.
UO288559 Apr 9, 2024
5a0f381
Modificación del mínimo de preguntas permitidad.
UO288559 Apr 9, 2024
45b9217
Merge branch 'master' into Marina
UO288559 Apr 9, 2024
2b35864
Merge pull request #118 from Arquisoft/Marina
UO288559 Apr 9, 2024
016de10
perfil hecho
angeeroza Apr 13, 2024
69ab517
Añadidos servicios a Sonar y los endpoints a OpenAPI
UO289337 Apr 13, 2024
db77892
Añadidas preguntas por tematicas al generador de preguntas
UO289337 Apr 14, 2024
55c4a13
Empezada la implementación de las temáticas
UO289337 Apr 14, 2024
64045ae
api usuarios
angeeroza Apr 15, 2024
2be7458
api preguntas
angeeroza Apr 15, 2024
f2ac94c
Cambiadas imágenes final de partida
uo289792 Apr 15, 2024
0aff471
Merge branch 'Implementation-David'
uo289792 Apr 15, 2024
0805d34
pantalla admin en proceso
angeeroza Apr 15, 2024
5401fd3
pantalla admin acabada
angeeroza Apr 15, 2024
7e1bc9a
Añadido NavBar para la pantalla de juego.
UO288559 Apr 15, 2024
cdb036a
Merge remote-tracking branch 'origin/Marina' into Marina
UO288559 Apr 15, 2024
9e1855c
Añadido NavBarGame al index.js.
UO288559 Apr 15, 2024
eaf3e0a
Añadido endpoint para finalizar la partida.
UO288559 Apr 15, 2024
dacde6b
Añadida llamada al endPoint.
UO288559 Apr 15, 2024
f28bec5
Eliminados console.log.
UO288559 Apr 15, 2024
9de0dfd
Solucionado error ruta index + añadido NavBarGame.
UO288559 Apr 15, 2024
a767826
Merge pull request #122 from Arquisoft/Marina
UO288559 Apr 15, 2024
882eb1f
arreglado fondo pantalla
angeeroza Apr 15, 2024
3878b44
tooltips botones
angeeroza Apr 15, 2024
8aaed74
Implementación de las temáticas; pequeños errores
UO289337 Apr 15, 2024
597f535
cambio titulo y icono aplicacion
angeeroza Apr 15, 2024
cac58dd
Merge branch 'master' into development-angela
angeeroza Apr 15, 2024
64a82d8
Merge pull request #123 from Arquisoft/development-angela
angeeroza Apr 15, 2024
a44ccbc
Login adaptable.
UO288559 Apr 16, 2024
e1f33f3
NavigationBar adaptable.
UO288559 Apr 16, 2024
3bdc3d8
NavigationBar_Game adaptable.
UO288559 Apr 16, 2024
63e3aae
GameConfiguration adaptable.
UO288559 Apr 16, 2024
18eae40
Registro adaptable.
UO288559 Apr 16, 2024
c470be3
Añadido botón perfil al menú desplegable del Nav.
UO288559 Apr 16, 2024
0cbac96
Merge branch 'master' into Marina
UO288559 Apr 16, 2024
f09f654
Merge pull request #126 from Arquisoft/Marina
UO288559 Apr 16, 2024
ab209bb
Arreglados errores debido al merge.
UO288559 Apr 16, 2024
f224fab
Añadido tooltip a NavBarGame.
UO288559 Apr 16, 2024
a64516e
Arreglados errores menores y añadidas nuevas preguntas
UO289337 Apr 16, 2024
2fb9703
Terminada implementación temáticas
UO289337 Apr 17, 2024
757848c
Merge branch 'master' into Ruben
UO289337 Apr 17, 2024
eec687b
Arreglados algunos tests
UO289337 Apr 17, 2024
1f32c7a
Solucionados pequeños errores
UO289337 Apr 17, 2024
8267e73
Merge pull request #127 from Arquisoft/Ruben
UO289337 Apr 17, 2024
8f458ba
traduccion funciona
angeeroza Apr 18, 2024
3225086
traduccion casi terminada
angeeroza Apr 18, 2024
8492131
traduccion terminada
angeeroza Apr 18, 2024
9f2d88b
Merge pull request #128 from Arquisoft/development-angela
angeeroza Apr 18, 2024
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
20 changes: 20 additions & 0 deletions apis/allquestionservice/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use an official Node.js runtime as a parent image
FROM node:20

# Set the working directory in the container
WORKDIR /usr/src/apis/allquestionservice

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install app dependencies
RUN npm install

# Copy the app source code to the working directory
COPY . .

# Expose the port the app runs on
EXPOSE 8007

# Define the command to run your app
CMD ["node", "allquestions-api.js"]
58 changes: 58 additions & 0 deletions apis/allquestionservice/allquestions-api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
const express = require('express');
const mongoose = require('mongoose');
const Question = require('./question-model')
const bodyParser = require('body-parser');

const app = express();
const port = 8007;

const originEndpoint = process.env.REACT_APP_API_ORIGIN_ENDPOINT || 'http://localhost:3000';

const mongoUri = process.env.MONGODB_URI || 'mongodb://localhost:27017/userdb';
mongoose.connect(mongoUri);

// Middleware to parse JSON in request body
app.use(bodyParser.json());

app.use((req, res, next) => {
res.setHeader('Access-Control-Allow-Origin', originEndpoint);
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
res.setHeader('Access-Control-Allow-Credentials', true);
next();
});


app.get('/getAllQuestions', async (req, res) => {
try{

var questions = await Question.find({ });

var questionsList = [];

questions.forEach(q => {
questionsList.push({
enunciado: q.enunciado,
respuesta_correcta: q.respuesta_correcta
});
});

// Devolver la lista completa de usuarios
res.json(questionsList);


} catch (error) {
console.error('No hay preguntas:', error);
res.status(500).json({ message: 'Error interno del servidor' });
}
});

const server = app.listen(port, () => {
console.log(`Creation Service listening at http://localhost:${port}`);
});

server.on('close', () => {
mongoose.connection.close();
});

module.exports = server;
Binary file added apis/allquestionservice/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading