Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX]: Resolve issue with retrieving product stock details. #1287

Open
PreciousIfeaka opened this issue Feb 28, 2025 · 1 comment
Open

[FIX]: Resolve issue with retrieving product stock details. #1287

PreciousIfeaka opened this issue Feb 28, 2025 · 1 comment
Labels
approved bug Something isn't working

Comments

@PreciousIfeaka
Copy link
Contributor

PreciousIfeaka commented Feb 28, 2025

Bug Description

The "Get Product Stock Details by ID" endpoint does not currently account for the organizationId, which is required by the Organization Ownership Guard. As a result, the feature fails when attempting to retrieve product stock details.

Steps to Reproduce

  1. create a new user and get the user's organization id
  2. create a product in the user's organization id and retrieve the product id
  3. try to get the stock details of the product you have created in the organization by its ID

Expected Behavior

The get product stock details by Id is meant to give a successful response with the correct product details given that the org and product IDs are valid.

Current Behavior

The endpoint currently gives this error response

{
  "message": "Invalid Organisation",
  "status_code": 400
}

Screenshots/Logs

{
  "message": "Invalid Organisation",
  "status_code": 400
}

Environment

  • OS: Linux
  • Browser/Device: chrome
  • Version: 22

Possible Solution

Restructure the endpoint to include the product's organization id to be used by the guard.

Additional Context

@PreciousIfeaka PreciousIfeaka added the bug Something isn't working label Feb 28, 2025
@AdeGneus
Copy link
Collaborator

Edit the title and description

@PreciousIfeaka PreciousIfeaka changed the title [FIX]: Fix get product stock details [FIX]: Resolve issue with retrieving product stock details. Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants