Hi. I am watching youtube tutorial and I've stucked on Register a new Customer stage.
I've watched 5times and I think I didn't miss on the video.. but
when I click "Register" Button, nothing is changed. the modal is kept opened.
and doing nothing.
You are nearly there, take a look at this quick tutorial and it'll explain what you need to know to debug that error - you'll have this fixed quickly..
Not actually familiar with that bit of video but "unauthorised" errors normally result from trying to perform a server action which you are not authorised to perform.
Are you logged in?
Is there a security restrict in the api action and if so, is it set correctly.
EDIT Sorry, didnt notice the API flow you posted,those unauthorised errors are generated by a number of checks on variables.
There are 3 places where your return a 401 (unauthorised) response in the action based on conditions. You need to check those values are correct
POST.id >=0
POST.position.length()>0
And
POST.title != $_SESSION.mykey
You need to check those values.
Gut feeling is you may have not set $_SESSION.mykey properly (based solely on fact that is an easy mistake to make).
I am guessing that is set elsewhere?
Scroll up and look at your Input settings under $_POST in your API - you should see a list of form fields that are being received by the form. Can you take a screenshot of that please?