Skip to content

Commit

Permalink
Merge pull request #222 from Arquisoft/develop
Browse files Browse the repository at this point in the history
Minimal changes for releasing
  • Loading branch information
sergiollende authored Apr 24, 2024
2 parents 04fc9af + 45e135f commit d709f8a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion users/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN npm install --no-cache
COPY . .

# Expose the port the app runs on
EXPOSE 8002
EXPOSE 8003

# Define the command to run your app
CMD ["node", "index.js"]
Expand Down
2 changes: 0 additions & 2 deletions users/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ app.use('/auth', authRoutes);
app.use('/user', userRoutes);




// Start the server
const server = app.listen(port, () => {
console.log(`Auth Service listening at http://localhost:${port}`);
Expand Down
4 changes: 1 addition & 3 deletions webapp/src/components/Game/Trivia/trivia_service.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Question } from "@/src/services/question-service";



let url = 'http://localhost:8000/';
let url = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000/';

const getString = (string : string) : string => {
return "Get" + string + "Questions";
Expand Down
1 change: 0 additions & 1 deletion webapp/src/services/auth-service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import axios from 'axios';
import { jwtDecode } from "jwt-decode";
import { useUserStore } from '../stores/user-store';
// import { useStats } from '../stores/playing-store';

const API_URL = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000';

Expand Down
13 changes: 5 additions & 8 deletions webapp/src/services/question-service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

import axios from 'axios';

export type Question = {
text: string,
Expand All @@ -10,14 +10,11 @@ export type Question = {

let url = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000/';



export const getQuestionsFromApi = async (): Promise<Question[]> => {
const response = await fetch(url + "GetQuestions");
const data = await response.json();

return data;
};
const response = await axios.get(url + "GetQuestions");
console.log('response:', response);
return response.data;
};

export const getEasyString = ():string => {
return "easy";
Expand Down

0 comments on commit d709f8a

Please sign in to comment.