Skip to content

Commit

Permalink
fixed bug with admin contactpoints - exchanged api endpoint #46
Browse files Browse the repository at this point in the history
  • Loading branch information
jannik.lange committed Jul 31, 2024
1 parent b72a119 commit 4fbef56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {useMutation} from "@tanstack/vue-query";
import {nextStep} from "@/features/the-unterstuetzungsfinder/api/UnterstuetzungsfinderClient";
import {nextStepAll} from "@/features/the-unterstuetzungsfinder/api/UnterstuetzungsfinderClient";
import {QuestionAndAnswer} from "@/features/the-unterstuetzungsfinder/types/QuestionAndAnswer";

export const useNextStep = () => useMutation({
mutationFn: (givenAnswers: QuestionAndAnswer[]) => {
return nextStep(givenAnswers.map(it => it.answerCompetence));
return nextStepAll(givenAnswers.map(it => it.answerCompetence));
}
})
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ import Conversation from "@/features/the-unterstuetzungsfinder/types/conversatio

export const nextStep = (competence: string[]) => {
return httpPostJson<Conversation>("/unterstuetzungsfinder/next", competence);
};

export const nextStepAll = (competence: string[]) => {
return httpPostJson<Conversation>("/unterstuetzungsfinder/nextAll", competence);
};

0 comments on commit 4fbef56

Please sign in to comment.