Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit resource user presentation #1333

Open
mpeck opened this issue Jan 27, 2017 · 0 comments
Open

Audit resource user presentation #1333

mpeck opened this issue Jan 27, 2017 · 0 comments

Comments

@mpeck
Copy link
Contributor

mpeck commented Jan 27, 2017

Currently models are encoded to json via either a Poison.Encoder implementation or a phoenix view. This leads to inconsistent output of data for users dependent on where they access the data.

For example the group model. If a user retrieves a group via the REST api they are presented with the following structure:

{"name": <group name>,
 "id": <group id>,
 "members": {"roles": [<roles>],
             "users": [<users>]}}

But when retrieving a group the the group chat command the structure returned looks like this:

{"name": <group name>,
 "id": <group id>,
 "role": [<roles>],
 "members": [<users>]}

This can not only cause confusion for the end user, but also makes it difficult to maintain the application. We should audit and consolidate how resources are presented to the user to provide more consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant