fossology / FOSSologyUI

Repository to hold the new UI framework for FOSSology built with React
https://fossology.github.io/FOSSologyUI/
GNU General Public License v2.0
49 stars 88 forks source link

fix(unexpected-token): Changed name of key #199

Closed pret3nti0u5 closed 2 years ago

pret3nti0u5 commented 2 years ago

Description

Changed key of setLocalStorage() in getUserSelf() from res.default_group to res.name as key default_group is no longer included in the response from endpoint /api/v1/users/self. Changing to res.name fixed the issue.

Changes

Changed key from res.default_group to res.name

How to test

Login using FossologyUI

Closes #198

GMishx commented 2 years ago

@pret3nti0u5 name is not the correct field. It should be default_group, just that FOSSology do not expose it.

It was proposed in API v2 here: https://github.com/Shruti3004/FOSSology-REST-API/pull/8

Can you create a PR from it to FOSSology? We can merge it there to make v1 work.

pret3nti0u5 commented 2 years ago

@GMishx I'll get on that, do you want me to close the PR here?

GMishx commented 2 years ago

That will make sense.