Skip to content

Implement APIs to load most appreciated users #62

Description

@recrsn

We need an API for loading information such as "Most Appreciated Users"

See:

This is a larger part of "meta" APIs to be grouped under "/api/meta"

Acceptance criteria

Expected request:

GET /api/meta/most_appreciated_users

Expected response: Array of most appreciated users

200 OK
Content-type: application/json

 
[
	  {
		  "name": "User",
		  "designation": "Developer",
		  "teamName": "Engineering",
		  "email": "user@example.com",
		  "profilePic": "https://example.com/image.jpg",
		  "username": "user",
		  "createdAt": "2021-02-09 21:35:24+05:30"
	  },
	  {
		  "name": "User2",
		  "designation": "Developer",
		  "teamName": "Engineering",
		  "email": "user2@example.com",
		  "profilePic": "https://example.com/image2.jpg",
		  "username": "user2",
		  "createdAt": "2021-02-09 21:35:24+05:30"
	  }
]

Tasks

We already have a query to get the most appreciated users here: https://github.com/snowflake-app/snowflake/blob/master/snowflake/models/appreciation.py#L57 So, the scope of this issue is limited to creating the controller to return the data in the appropriate format.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions