fix: mikrORM fix voor questions
This commit is contained in:
parent
50cfcb69a6
commit
c8d1112db2
2 changed files with 11 additions and 7 deletions
|
@ -139,12 +139,15 @@
|
|||
(assignment) => assignment.learningPath === props.hruid && assignment.language === props.language,
|
||||
);
|
||||
});
|
||||
const loID: ComputedRef<LearningObjectIdentifierDTO> = computed(() => {
|
||||
return {
|
||||
hruid: props.learningObjectHruid as string,
|
||||
language: props.language,
|
||||
version: currentNode.value?.version
|
||||
};
|
||||
});
|
||||
|
||||
const loID: LearningObjectIdentifierDTO = {
|
||||
hruid: props.learningObjectHruid as string,
|
||||
language: props.language,
|
||||
};
|
||||
const createQuestionMutation = useCreateQuestionMutation(loID);
|
||||
const createQuestionMutation = useCreateQuestionMutation(loID.value);
|
||||
const groupsQueryResult = useStudentGroupsQuery(authService.authState.user?.profile.preferred_username);
|
||||
|
||||
const questionInput = ref("");
|
||||
|
@ -159,7 +162,7 @@
|
|||
const questionData: QuestionData = {
|
||||
author: authService.authState.user?.profile.preferred_username,
|
||||
content: questionInput.value,
|
||||
inGroup: group, //TODO: POST response zegt dat dit null is???
|
||||
inGroup: group,
|
||||
};
|
||||
if (questionInput.value !== "") {
|
||||
createQuestionMutation.mutate(questionData, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue