Where to check if user is owner
Hello,
I have and app with three entities User, Deck and Card, and now for any operation on card/deck I need to check if user is owner of that deck
I'm doing it like this:
But I need to call this in each router method, now I wonder could I create a procedure for this? And if answer is yes how could I pass deckID variable to procedure?
Thanks in advance
I have and app with three entities User, Deck and Card, and now for any operation on card/deck I need to check if user is owner of that deck
I'm doing it like this:
But I need to call this in each router method, now I wonder could I create a procedure for this? And if answer is yes how could I pass deckID variable to procedure?
Thanks in advance
