<aside> 💡
When you use fetch in a function, you need to use .then and .catch when calling that function from another file.
fetch must need .then and .catch
</aside>

I make some function getArticleList using GET method with body.
But there was an TypeError: Request with GET/HEAD method cannot have body.
Throughly examine the error message, I got GET method cannot have HEAD also the body.
Then I thought ‘How can I put lists into request body if I can’t use body with GET?’.
And an idea came across that ‘Maybe only { page, pageSize, keyword} parameter is enough.’ So I erase method, headers, body and const lists.

There is no error in main.js now but the function doesn’t work properly.

Test if it’s only a wrong articleId problem or the function is failed to build well.
I asked to AI, and it said because I don’t have return value in all functions. Therefore I inserted code return res.data; at the end of the all functions.

But it returns ReferenceError: res is not defined.
I look up the answers again, than it saids I should return all of the fetch value using return in front of the fetch.
Change all the functions with return.