Rehachoudhary0 / hotel_testing

1 stars 1 forks source link

🐛 Bug Report: /hotel/chat/latest API response, not the proper format. #255

Closed rvndsngwn closed 2 years ago

rvndsngwn commented 2 years ago

👟 Reproduction steps

In https://app.roomistapp.com/api/hotel/chat/latest API response is not proper format.

👍 Expected behavior

{
    "success": true,
    "error": [],
    "message": "Latest 50 Chat returned Successfully.",
    "response": {
        "Latest Chat": {
            "0": {
                "hotel_id": 4,
                "hotel_name": "Orio peace of beauty",
                "customer_name": "Virgil funky",
                "chat_id": 82,
                "hotel_user_id": 6,
                "from": "Customer",
                "type": "Reception",
                "customer_id": 8,
                "message": "Clean Room, Clean Washroom, Washroom geyser not working, Cigarette A ",
                "status": "Unread",
                "created_at": "2022-10-03 15:23:23",
                "updated_at": "2022-10-03 15:23:23",
                "totalMsg": 2,
                "unreadCount": 2,
                "rooms": "234"
            },
            "1": {
                "hotel_id": 4,
                "hotel_name": "Orio peace of beauty",
                "customer_name": "Virgil funky",
                "chat_id": 82,
                "hotel_user_id": 6,
                "from": "Customer",
                "type": "Reception",
                "customer_id": 8,
                "message": "Clean Room, Clean Washroom, Washroom geyser not working, Cigarette A ",
                "status": "Unread",
                "created_at": "2022-10-03 15:23:23",
                "updated_at": "2022-10-03 15:23:23",
                "totalMsg": 2,
                "unreadCount": 2,
                "rooms": "234"
            },
            "AllTotalMsg": 28,
            "AllUnreadCount": 12
        }
    }
}

👎 Actual Behavior

{
    "success": true,
    "error": [],
    "message": "Latest 50 Chat returned Successfully.",
    "response": {
        "Latest Chat": [
             {
                "hotel_id": 4,
                "hotel_name": "Orio peace of beauty",
                "customer_name": "Virgil funky",
                "chat_id": 82,
                "hotel_user_id": 6,
                "from": "Customer",
                "type": "Reception",
                "customer_id": 8,
                "message": "Clean Room, Clean Washroom, Washroom geyser not working, Cigarette A ",
                "status": "Unread",
                "created_at": "2022-10-03 15:23:23",
                "updated_at": "2022-10-03 15:23:23",
                "totalMsg": 2,
                "unreadCount": 2,
                "rooms": "234"
            },
            {
                "hotel_id": 4,
                "hotel_name": "Orio peace of beauty",
                "customer_name": "Virgil funky",
                "chat_id": 82,
                "hotel_user_id": 6,
                "from": "Customer",
                "type": "Reception",
                "customer_id": 8,
                "message": "Clean Room, Clean Washroom, Washroom geyser not working, Cigarette A ",
                "status": "Unread",
                "created_at": "2022-10-03 15:23:23",
                "updated_at": "2022-10-03 15:23:23",
                "totalMsg": 2,
                "unreadCount": 2,
                "rooms": "234"
            },
           ]
            "AllTotalMsg": 28,
            "AllUnreadCount": 12
    }
}

🎲 App version

Version 22.10.01+01

💻 Operating system

Android

👀 Have you spent some time to check if this issue has been raised before?

🏢 Have you read the Code of Conduct?

parveen-malik commented 2 years ago

format fixed by api

parveen-malik commented 2 years ago

Ok sir ...

On Mon, 3 Oct 2022, 9:09 pm Arvind Sangwan, @.***> wrote:

Assigned #255 https://github.com/Rehachoudhary0/hotel_testing/issues/255 to @parveen-malik https://github.com/parveen-malik.

— Reply to this email directly, view it on GitHub https://github.com/Rehachoudhary0/hotel_testing/issues/255#event-7508538905, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO4MMOFG7IBAZ6KWOA5EAPDWBL43FANCNFSM6AAAAAAQ3W5IK4 . You are receiving this because you were assigned.Message ID: @.***>