kowhai-2018 / Final-Project

0 stars 3 forks source link

PWA - troubleshooting the date response from Heroku vs Loca #197

Open CarelS072 opened 5 years ago

CarelS072 commented 5 years ago

Our server on Heroku PostGres is not returning the date when calling the api Example: https://kowhai-fp.herokuapp.com/api/v1/records/cards/1/2018-12-12

{
    "Okay": true,
    "records": {
        "dateId": 4,
        "date": "2018-12-12T00:00:00.000Z",
        "userId": 1,
        "cardData": [
            {
                "id": 91,
                "activityId": 1,
                "rating": 3,
                "log": null
            }
        ]
    }
}

VS Local SQLite http://localhost:3000/api/v1/records/cards/1/2018-12-08

{
    "Okay": true,
    "records": {
        "dateId": 10,
        "date": "2018-12-08",
        "userId": 1,
        "cardData": [
            {
                "id": 172,
                "activityId": 1,
                "rating": 5,
                "log": ""
            },
            {

After speaking with Rich we can resolve it by either getting the Front end to learn to read both the styles or we will need to review if we can transform the date the backend response with to always be in a certain format