Skip to content

Commit

Permalink
Merge pull request #223 from Arquisoft/develop
Browse files Browse the repository at this point in the history
Changes in question routes
  • Loading branch information
sergiollende authored Apr 24, 2024
2 parents d709f8a + c8fec77 commit 1aea949
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions webapp/src/components/Game/Trivia/trivia_service.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Question } from "@/src/services/question-service";

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

const getString = (string : string) : string => {
return "Get" + string + "Questions";
return "/Get" + string + "Questions";
}

export const getSportQuestions = async (): Promise<Question> => {
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/services/question-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export type Question = {
}


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

export const getQuestionsFromApi = async (): Promise<Question[]> => {
const response = await axios.get(url + "GetQuestions");
const response = await axios.get(url + "/GetQuestions");
console.log('response:', response);
return response.data;
};
Expand Down

0 comments on commit 1aea949

Please sign in to comment.