amit-ib / Todo-v2

0 stars 0 forks source link

TDAP070 - User Role #56

Open amit-ib opened 1 year ago

amit-ib commented 1 year ago

Please update /login API to get "userRole" as new key item in json and its value is going to be a number
1 = Super Admin 2= Admin 3 = User

akash-dhande-ib commented 1 year ago

Hi @amit-ib

I have created 2 new endpoints

  1. user-roles to get all user roles.
  2. users to get all users (only accessible by super admin and admin).

Also updated the response of todos, now response will look like following.

{
    "total": 1,
    "pending": 0,
    "inProgress": 1,
    "completed": 0,
    "archived": 0,
    "todos": []
}

let me know if any changes are required.

Thanks