mozilla/minion-backend — pull request #263 by yeukhon (2013-09-12 07:25:05+00:00)
Title: Refactor invite

This is a series of changes.
I added a context manager called "do_invitation" to perform __enter__,
task, and __exit__ which allows me to refactor out the common code
used throughout the resend/decline/accept apis.

Now we have /invite//resend decline accept

Note we do ``users.save(user_doc)`` is okay because we don't change the underlying object id. This is the same as doing ``users.update({'_id': objectid}, {$set.....})`` but it's easier to update.