Skip to content

View a user's profile #3

Open
Open
@mazma1

Description

This is to implement an endpoint that will enable a logged in user access his/her profile information.

This endpoint is expected to return a user object that contains the username and email of the authenticated user.

Endpoint:
GET /profile/:id

Response spec:

{ ​ 
   "user":​ {
      "username": "...",
      "email": "..."
   }
}

Edge cases to keep in mind:

  • Do not include the password in the response object.
  • An authenticated user should only be authorized to view his/her own profile information
  • Responses should be sent with the appropriate status codes
  • Handle errors properly and return appropriate error messages like so:
     { ​ 
        "error":​ ​"appropriate error message"
     }
    

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions