[GET] /api/logs

description ⇒ Obtain all existing logs with their associated creator, sensor and organization.

[
 {
"id": 1,
"date_filed": "2020-01-31T17:52:55.482Z",
"last_modified": "2020-01-31T09:52:55.482-08:00",
"status": 2,
"comment": "test",
"operator_id": 2,
"sensor_id": 4715
  }
]

[GET] /api/logs/operator

description ⇒ get logs by operator id (uses operator's id by decoding the token)

[
  {
    "id": 1,
    "date_filed": "2020-01-31T17:52:55.482Z",
    "last_modified": "2020-01-31T09:52:55.482-08:00",
    "status": 2,
    "comment": "test",
    "operator_id": 2,
    "sensor_id": 4715
  },
  {
    "id": 2,
    "date_filed": "2020-01-31T17:52:56.652Z",
    "last_modified": "2020-01-31T09:52:56.652-08:00",
    "status": 2,
    "comment": "test",
    "operator_id": 2,
    "sensor_id": 4715
  },
  {
    "id": 3,
    "date_filed": "2020-01-31T17:52:57.303Z",
    "last_modified": "2020-01-31T09:52:57.302-08:00",
    "status": 2,
    "comment": "test",
    "operator_id": 2,
    "sensor_id": 4715
  },
  {
    "id": 4,
    "date_filed": "2020-02-03T16:21:58.899Z",
    "last_modified": null,
    "status": 2,
    "comment": "ok",
    "operator_id": 2,
    "sensor_id": 4717
  }
]

[GET] /api/logs/sensor/:id

description ⇒ //get logs by sensor id

[
  {
    "id": 1,
    "date_filed": "2020-01-31T17:52:55.482Z",
    "last_modified": "2020-01-31T09:52:55.482-08:00",
    "status": 2,
    "comment": "test",
    "operator_id": 2,
    "sensor_id": 4715
  },
  {
    "id": 2,
    "date_filed": "2020-01-31T17:52:56.652Z",
    "last_modified": "2020-01-31T09:52:56.652-08:00",
    "status": 2,
    "comment": "test",
    "operator_id": 2,
    "sensor_id": 4715
  },
  {
    "id": 3,
    "date_filed": "2020-01-31T17:52:57.303Z",
    "last_modified": "2020-01-31T09:52:57.302-08:00",
    "status": 2,
    "comment": "test",
    "operator_id": 2,
    "sensor_id": 4715
  }
]

[POST] /api/logs

description ⇒ add a log to the sensor_logs table (uses operator's id by decoding the token)

request body
{
	"sensor_id": 4715, <-- [notNullable]
	"status": 2,
	"comment": "example"
}

response
{
  "id": 11,
  "date_filed": "2020-02-04T23:31:56.084Z",
  "last_modified": "2020-02-04T15:31:56.081-08:00",
  "status": 2,
  "comment": "example",
  "operator_id": 2,
  "sensor_id": 4715
}

[PUT] /api/logs/:id

description ⇒ update a log

request
{
	"comment": "put"
}

response
{
  "message": "Successfully updated log"
}