Vue3 can't assign parameter

You have to return the data from the function, not expect the "return variable" as another parameter, that's not how it works.

callAPI(params: string) {
  return axios
    .get(`https://printful.com/test-quiz.php?action=${params}`)
    .then((res) => {
      return res.data;
    });
  },
},
async created() {
  this.quizzAllCategories = await this.callAPI("quizzes");
},