ita-social-projects / GreenCity

The main aim of “GreenCity” project is to teach people in a playful and challenging way to have an eco-friendly lifestyle. A user can view on the map places that have some eco-initiatives or suggest discounts for being environmentally aware (for instance, coffee shops that give a discount if a customer comes with their own cup). А user can start doing an environment-friendly habit and track their progress with a habit tracker.
MIT License
65 stars 80 forks source link

[API](Get all active locations where courier is working) Wrong response body when got status 200 OK for unauthorised and authorised as an Admin users. #7613

Open nuttaa0 opened 4 weeks ago

nuttaa0 commented 4 weeks ago

Environment: OS: MacOS Sonoma version 14.6, browser: Google Chrome Version 128.0.6613.138 (x86_64) Reproducible: always

Preconditions https://greencity-ubs.greencity.cx.ua/swagger-ui/index.html#/order-controller/getAllActiveLocationsByCourierId is opened

Steps to reproduce

  1. Click 'Try it out' button
  2. Enter valid courier Id (e.g. 6)
  3. Click 'Execute' button
  4. Authorised as an Admin
  5. Click 'Execute' button

Actual result The status code is 200 OK. Response body: Image

Expected result The status code is 200 OK. Response body:

Image

{ "allActiveLocationsDtos": null, "tariffsForLocationDto": { "tariffInfoId": 1, "min": 2, "max": null, "courierLimit": "LIMIT_BY_AMOUNT_OF_BAG", "regionDto": { "regionId": 1, "nameEn": "Kyiv Oblast", "nameUk": "Київська область" }, "locationsDtosList": [ { "locationId": 1, "nameEn": "Kyiv", "nameUk": "Київ" } ], "courierDto": { "courierId": 1, "courierStatus": "ACTIVE", "nameUk": "УБС", "nameEn": "UBS", "createDate": null, "createdBy": null }, "limitDescription": null }, "orderIsPresent": true }

Labels to be added "Bug", "API"

ToriForH commented 1 week ago

Pay attention: body was refactored Also check: ubs/tariffinfo/{locationId}