I have an API that does the POST of Item in the database, but before doing POST it makes a GET to get a code for the Item that will be saved.
NOTE: This code can not be repeated in the database, it must be unique.
When sending an array with two items, they are catching the same code, conflicting when writing to DB.
The two items pass on line 102, and then the two items go on line 113.
How to make one item at a time get the code and then save it in the bank so the next items do the same process?