minimalchat / daemon

Minimal Chat's API server daemon
https://minimal.chat
BSD 3-Clause "New" or "Revised" License
55 stars 8 forks source link

Adding open flag to chat object #15

Closed mihok closed 7 years ago

mihok commented 7 years ago

For issue #13. Super straight forward, new response for the chat looks like this:

GET /api/chats HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Type: application/json
Host: localhost:8000
User-Agent: HTTPie/0.9.8

HTTP/1.1 200 OK
Content-Length: 296
Content-Type: application/json; charset=UTF-8
Date: Tue, 14 Mar 2017 00:53:02 GMT

{
    "chats": [
        {
            "client": {
                "first_name": "",
                "id": "6f51edfe-0614-4280-8c6f-ba5a892c49b6",
                "last_name": "",
                "name": "Site Visitor",
                "socket": {}
            },
            "creation_time": "2017-03-13T20:53:00.024647934-04:00",
            "id": "JsuZbZyJJc5lum2fgMni",
            "open": true,
            "operator": null,
            "update_time": "2017-03-13T20:53:00.024647969-04:00"
        }
    ]
}
coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 16e5661d859fb2aa5f792ddb9a79c36c9ce75cd3 on feature/open-flag into d766508438f14dabfc100f842607d7fcdc76bcdc on master.