RPGLibrarium / liberation-web

Static content of Liberation
0 stars 0 forks source link

check (& fix) frontend after backend rewrite #2

Open sudo42 opened 2 years ago

sudo42 commented 2 years ago

Some parts of the API might have changed (RPGLibrarium/liberation#26), and we should check whether the client — in its rudimentary state — still works. (And, of course, fix the frontend if it is broken!)

sudo42 commented 2 years ago

At the moment, the frontend still checks for roles in access tokens (for developer and admin). But those are not sent anymore and the code isn't fault-tolerant enough to deal with that.

In addition, @Paradyx mentioned that we should use this with the new scope-based approach:

keycloak().login({scope: "account:modify"})
sudo42 commented 2 years ago

Another issue: It seems that our previous API used nested return values ({"titles":[{}, {}, ...] }) whereas the new revision uses plain arrays ([{}, {}, {}, ...]). The current frontend implementation expects the nested variants and therefore fails to render the returned data.