pub fn activate(
db: &Database,
item: &ActivationInput,
mailer: &Mailer,
) -> Result<(), (u16, &'static str)>
Expand description
/activate
activates the account associated with the token in item
§Errors
- 401: Invalid token
- 401: Invalid token
- 400: Invalid token
- 200: Already activated!
- 500: Could not activate user
§Panics
- could not connect to database
- could not get
SECRET_KEY
from environment
TODO: don’t panic if db connection fails, just return an error