Closed slim2k6 closed 7 years ago
I can go through the same flow using postman. I can register, login and send file to a1 without problem. So looks like the problem is on the client.
Register function in client is sending wrong data. See request payload and the appUrl. It should just be "student" which is what I entered in the form. but its a full url. The API only expects the "student" part as well. The rest is hardcoded and the user should not be able to change that. so in https://azoraone.azure-api.net/student/api/companies https://azoraone.azure-api.net/ - is hardcoded student - is what client should send when registering /api/companies - is hardcoced
To:
const appUrl = this.registerForm.get('appUrl').value;
Helpers can probably be totaly removed after this since this is the only place it's being used.
did what you wrote. didnt remove helpers though since you said probably and I wanna be sure :) heres a PR for that https://github.com/Ekerot/arkimera-robotics-project/pull/193
Will check and probably remove helpers later. For now this is closed.
steps to reproduce: dropping the db, running the client and api, registering a new user (without seeding data), logging in, choose pdf in project postman directory to upload and press upload