Deal Spec

Expected Functionality

Get all users

Request: GET /api/users/
Description: Return all the users in the database, including their user id, googleID, netid, username, description, posts, and comments.
Response:
{
    "success": true,
    "data": [
        {
            "id": 1,
            "googleID": "hhhhh",
            "netid": "sh2429",
            "username": "Joyce",
            "description": "CS vegetable bird",
            "posts": [],
            "comments": [
                {
                    "id": 2,
                    "score": 0,
                    "text": "I also want to buy this",
                    "username": "Joyce"
                }
            ]
            "favouritePosts":[1, 2]
        },
        {
            "id": 2,
            "googleID" : "xswl",
            "netid": "xz598",
            "username": "Xiangyi",
            "description": " ECE vegetable chicken",
            "posts": [
                {
                    "id": 2,
                    "googleID": "xswl",
                    "score": 0,
                    "itemname": "Harry Potter",
                    "itemtype": "book",
                    "price": 90,
                    "description": "by J.K. Rowling",
                    "item_condition": "very good",
                    "username": "Xiangyi",
                    "comments": [
                        {
                            "id": 1,
                            "score": 0,
                            "text": "I want to buy this",
                            "username": "Emily"
                        },