garden-stream / garden

shared resources
0 stars 2 forks source link

User profile #7

Closed keawade closed 4 years ago

keawade commented 7 years ago

A user should have something like the following route

NathanBland commented 7 years ago

The user could probably also see some enhancements as far as what lives on the object, but that's another issue.

NathanBland commented 7 years ago

After looking further, at the moment, there are actually no properties on the user object that I want to be changeable.

What did you have in mind?

keawade commented 7 years ago

Users should probably have a unique id so they can change their username/displayname/email/whatever. Whatever those extra fields beyond unique id and password are, they should be changeable (probably).

NathanBland commented 7 years ago

Users do have a unique id, but for friendliness we do everything by username.. Which could be changeable I suppose, it just adds to the chance that someone will forget their login information..

keawade commented 7 years ago

Email doesn't exist currently, but should if we want to be able to send out email alerts or compilations of recent content.

We need a unique identifier for navigation to their profile and also for a login username. These don't have to be the same field.

If we're masking usernames behind display names, do we want to navigate with usernames? I think we might want to use their user ids instead.

NathanBland commented 7 years ago

I think it is still best to navigate with username. Even if you can change your display name, username makes a nice constant, and far nicer looking urls than ids

keawade commented 7 years ago

Okay so it looks like we've got this structure for users then:

{
  username: string;
  displayname: string;
  posts: Array<PostObject>;
  following: Array<UserObject>;
  followers: Array<UserObject>;
}

I think we should drop all but user name and display name when returning arrays of UserObjects or posting a UserObject.