yada

johnswanson 2018-03-16T16:34:36.000584Z

hey, i have a noob question about yada (and REST, i guess): i'd like to allow people to create users via a POST request, but usernames/email addresses must be unique. what's the best place to specify that uniqueness restriction? right now i'm just manually updating the response status to 409 in the :response function, but is there a better way to specify constraints like these?

mccraigmccraig 2018-03-16T16:36:37.000389Z

409 and some description of the error in the body which your client can use to present an error seems reasonable @slack1097

johnswanson 2018-03-16T16:37:33.000725Z

alright, thank you!

johnswanson 2018-03-16T16:37:58.000567Z

just wanted to make sure there wasn't a "standard" way to declare restrictions like that 🙂

mccraigmccraig 2018-03-16T16:45:11.000234Z

nothing i'm aware of anyway 😬