nudj / nudj-backend

Nudj - Backend (Archive)
0 stars 0 forks source link

Add `bonus_currency` to notification payload #22

Open richardbuckle opened 8 years ago

richardbuckle commented 8 years ago

Currently the JSON payload includes the bonus amount under the key meta.job_bonus. Please add the currency code (in the SQL schema it is bonus_currency in the jobs table) to the JSON payload under the key meta.job_bonus_currency

shtukas commented 8 years ago

Which API call is this ?

richardbuckle commented 8 years ago

api/v1/notifications

shtukas commented 8 years ago

Before the change

{
    "id": 94,
    "type": 5,
    "message": "Richard Buckle is interested in the Test- 13\/06 position",
    "meta": {
        "job_id": "46",
        "job_title": "Test- 13\/06",
        "job_bonus": "30.00",
        "position": "Test- 13\/06",
        "candidate": "Richard Buckle",
        "phone": "+447711139749",
        "chat_id": 97
    },
    "read": true,
    "created": 1465823502,
    "sender": {
        "id": "2",
        "name": "Richard Buckle"
    }
}
``
shtukas commented 8 years ago

After change:

{
    "id": 95,
    "type": 5,
    "message": "Bob Tester is interested in the title:906aa8d7a758893f1f0d544cbf13e2aa position",
    "meta": {
        "job_id": 1,
        "job_title": "title:906aa8d7a758893f1f0d544cbf13e2aa",
        "job_bonus": 561,
        "position": "title:906aa8d7a758893f1f0d544cbf13e2aa",
        "candidate": "Bob Tester",
        "phone": "+447700900002",
        "job_bonus_currency": "GBP"
    },
    "read": false,
    "created": 1466192991,
    "sender": {
        "id": "13",
        "name": "Bob Tester"
    }
}
shtukas commented 8 years ago

Pushed to dev and prod.