nqthqn / craconweb

https://www.cravecontrol.org
0 stars 1 forks source link

mes changes #59

Closed nqthqn closed 7 years ago

nqthqn commented 7 years ago

current functionality

adjusted functionality

daved commented 7 years ago

Sorry about that. I clicked "close and comment" when I meant to cancel the comment.

daved commented 7 years ago

The backend changes for this are completed.

The mesanswer response message now has an "initials" field. mesanswer - initials field

In order to provide the full name, a new "mesauthor" endpoint has been added which requires a list of mesanswer ids, and a group id (or groupEach). The mesauthor response(s) returned has a mesanswer id field and user name field. mesauthor - messages mesauthor - endpoint

Edit to add: An example of the mesauthor GET params: https://example.com/mesauthors?groupId=321&mesanswerId=1234&mesanswerId=2345


I'll push forward the DB analysis view a bit and update you (@nqthqn) around lunch time. After that's settled enough, I will resume Elm work. Feel free to alter my direction as needed.

nqthqn commented 7 years ago

@daved Looks like you are on a clear course. Thanks for the update!

I take it since initials is not present in the Req only the Resp * the burden on setting it is on the backend?

daved commented 7 years ago

I take it since initials is not present in the Req only the Resp * the burden on setting it is on the backend?

Correct. The initials are generated dynamically from the user's stored firstName and lastName which is defined here. It is in the format of "First Last = FL". Additional formatting (e.g., dots after each initial) will require processing in the frontend. This representation was picked to improve the consistency of results while requiring as little processing as possible (to avoid having to handle something like "F.." if a last name was omitted), and because initials are normally capitalized when displayed. Personally, I'd probably forgo adding dots in the frontend unless directed otherwise.

daved commented 7 years ago

Closing in favor of tracking #61.