I hope the question title already answers the subject here. Lets say I have a number of ids that needs to be validated in a request.
Example:
request uri:
[POST] /album/{album_id}/song
Request payload:
[
"song_title": "hello world",
"genre_id": 2,
"artist_id": [100, 102],
"lyrics_by_id": 201
]
Now, as we know we would definitely have to validate those ids, for which we run some queries over there.
Is there a way out, where we can use those objects or data retrieved from database in order to use it in the rest of the code?