You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewCustomErrors_1.OpenTDBError("'difficulty' option for QuestionOptions must be of type string, received ".concat(typeofdifficulty),CustomErrors_1.OpenTDBError.errors.headers.INVALID_OPT);
85
85
}
86
-
varvalues=["easy","medium","hard"];
86
+
varvalues=[
87
+
enums_1.QuestionDifficulties.Easy,
88
+
enums_1.QuestionDifficulties.Medium,
89
+
enums_1.QuestionDifficulties.Hard
90
+
];
87
91
if(!values.includes(difficulty)){
88
92
thrownewCustomErrors_1.OpenTDBError("'difficulty' option (\"".concat(difficulty,"\") for QuestionOptions does not resolve into a question difficulty"),CustomErrors_1.OpenTDBError.errors.headers.INVALID_OPT);
thrownewCustomErrors_1.OpenTDBError("'encode' option for QuestionOptions must be of type string, received ".concat(typeofencode),CustomErrors_1.OpenTDBError.errors.headers.INVALID_OPT);
98
102
}
99
103
varvalues=[
100
-
"base64",
101
-
"none",
102
-
"url3986",
103
-
"urlLegacy",
104
+
enums_1.QuestionEncodings.UrlLegacy,
105
+
enums_1.QuestionEncodings.Url3986,
106
+
enums_1.QuestionEncodings.Base64,
107
+
enums_1.QuestionEncodings.None
104
108
];
105
109
if(!values.includes(encode)){
106
110
thrownewCustomErrors_1.OpenTDBError("'encode' option (\"".concat(encode,"\") for QuestionOptions does not resolve into a question encode"),CustomErrors_1.OpenTDBError.errors.headers.INVALID_OPT);
thrownewCustomErrors_1.OpenTDBError("'type' option for QuestionOptions must be of type string, received ".concat(typeoftype),CustomErrors_1.OpenTDBError.errors.headers.INVALID_OPT);
128
132
}
129
-
varvalues=["boolean","multiple"];
133
+
varvalues=[
134
+
enums_1.QuestionTypes.Boolean,
135
+
enums_1.QuestionTypes.Multiple
136
+
];
130
137
if(!values.includes(type)){
131
138
thrownewCustomErrors_1.OpenTDBError("'type' option (\"".concat(type,"\") for QuestionOptions does not resolve into a question type"),CustomErrors_1.OpenTDBError.errors.headers.INVALID_OPT);
0 commit comments