move move frontend to progress-test
This commit is contained in:
15
app/javascript/pages/question/formatInputs.ts
Normal file
15
app/javascript/pages/question/formatInputs.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Question } from "../../__generated__/graphql-schema";
|
||||
|
||||
export const formatInput = (inputs: any) =>
|
||||
({
|
||||
...inputs,
|
||||
bloomTaxonomy:
|
||||
inputs.bloomTaxonomy === "" ? undefined : inputs.bloomTaxonomy,
|
||||
difficulty: inputs.difficulty === "" ? undefined : inputs.difficulty,
|
||||
checkType: inputs.checkType === "" ? undefined : inputs.checkType,
|
||||
subjectId: inputs.subjectId === "" ? undefined : inputs.subjectId,
|
||||
reviewerUserId:
|
||||
inputs.reviewerUserId === "" ? undefined : inputs.reviewerUserId,
|
||||
alternatives: inputs.alternatives,
|
||||
__nonused: undefined,
|
||||
} as Question);
|
||||
Reference in New Issue
Block a user