Commit Graph

6 Commits

Author SHA1 Message Date
Simone Gotti
43e860d3c5 auth/data: avoid setting global errors when receiving a 401
If we do a router.push to the login view the previous component will receive
anyway the error and set the global error after the login view is mounted (!!!)
and so the main app will show the global error instead of the login view.

Not sure how to avoid this. As a really ugly workaround just return an empty
response on 401 so the components (since they are currently assumong the
response is always define) will throw an exception and not set the global error.
2019-07-05 13:41:43 +02:00
Simone Gotti
e47c3b977c register: move api to data/auth.js and handle errors 2019-05-21 11:06:38 +02:00
Simone Gotti
e25510e026 auth: update api auth endpoints 2019-05-16 10:04:33 +02:00
Simone Gotti
789d0f5fcd *: handle api errors
* Use a global error when fetching data
* Use a local error message when calling a mutating api
2019-05-13 16:29:47 +02:00
Simone Gotti
ef5a9c4994 Add user registration 2019-03-29 18:08:54 +01:00
Simone Gotti
b780e148cc Initial commit 2018-12-09 14:21:20 +01:00