Skip to content

[$10] Create payment by query endpoint should return query as it was sent #354

@maxceem

Description

@maxceem

When we create payments by query using POST /work-period-payments/query endpoint we should get query in response the same which we sent in request.

At the moment if we send query like this:

{
  "query": {
    "status": "placed",
    "workPeriods.startDate": "2021-06-13",
    "workPeriods.paymentStatus": "completed,pending,partially-completed"
  }
}

We get it in response like this:

{
  "total": 64,
  "query": {
    "status": "placed",
    "workPeriods.startDate": "2021-06-13T00:00:00.000Z",
    "workPeriods.paymentStatus": "completed,pending,partially-completed"
  },
  "totalSuccess": 30,
  "totalError": 34
}

The issue is that date format is not the same:

  • in Request: "workPeriods.startDate": "2021-06-13",
  • in Response: "workPeriods.startDate": "2021-06-13T00:00:00.000Z",

Date format in response should be the same like in request for all the dates.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions