diff --git a/gatewayservice/openapi.yaml b/gatewayservice/openapi.yaml index 65cfed8..eb8bac9 100644 --- a/gatewayservice/openapi.yaml +++ b/gatewayservice/openapi.yaml @@ -303,7 +303,7 @@ paths: required: true schema: type: string - enum: [es, en, tk] + enum: [es, en, tr] description: Language code for filtering questions responses: '200': @@ -337,7 +337,7 @@ paths: required: true schema: type: string - enum: [es, en, tk] + enum: [es, en, tr] description: Language code for filtering questions - name: amount in: path @@ -379,7 +379,7 @@ paths: required: true schema: type: string - enum: ["es", "en", "tk"] + enum: ["es", "en", "tr"] description: Language code for filtering questions - name: amount in: path diff --git a/webapp/src/components/questionView/QuestionGenerator.js b/webapp/src/components/questionView/QuestionGenerator.js index 442ed3b..4d3993d 100644 --- a/webapp/src/components/questionView/QuestionGenerator.js +++ b/webapp/src/components/questionView/QuestionGenerator.js @@ -9,7 +9,10 @@ class QuestionGenerator{ } async generateQuestions(lang, type, amount, token) { - + if(amount < 1) + amount = 1; + if(amount > 20) + amount = 20; try { let response; if(type==="COMPETITIVE"){ diff --git a/webapp/src/index.js b/webapp/src/index.js index 103dc80..c9f88d5 100644 --- a/webapp/src/index.js +++ b/webapp/src/index.js @@ -7,7 +7,7 @@ import {I18nextProvider} from "react-i18next"; import i18next from "i18next"; import global_es from "./translations/es/global.json" import global_en from "./translations/en/global.json" -import global_tk from "./translations/tk/global.json" +import global_tr from "./translations/tr/global.json" @@ -24,8 +24,8 @@ i18next.init({ en:{ global:global_en, }, - tk:{ - global:global_tk, + tr:{ + global:global_tr, } }, })