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 #28481 API /mos/{id}/produceandconsume #29777

Closed

Conversation

Humml87
Copy link
Contributor

@Humml87 Humml87 commented May 28, 2024

Fix #28481 API functionality.
The old code can't work with the current versions.
Now the code API-Call represented the function from the Webpage.

Best regards
Christian

@eldy
Copy link
Member

eldy commented May 29, 2024

i think i understand how the API was supposed to work.
I added some comment to explain it.

The way to use it is:
* - If arraytoconsume and arraytoproduce are both filled, this fill an empty MO with the lines to consume and produce and record the consumption and production.
* - If arraytoconsume and arraytoproduce are not provided, it consumes and produces all existing lines.

This means we can't use it to decide which line we consume or not. We can't use it to make partial consumption or production.
So, the conclusion is that old API can't work. So i fixed the bug and i renamed it into produceAndConsumeAll (to not lose code that may be usefull once fixed).

so i merged your PR manually to add it as the code for produceAndConsume()

Thanks to check...

@eldy eldy closed this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants