pub async fn validate_session_wrapper(
json_session: Json<JsonSession>,
pool: Data<Pool<Postgres>>,
) -> impl ResponderExpand description
Wrapper for validate_session_wrapper. Returns 202 if validated successfully and the session is correct in the DB, it will return a json representation of the validated session. In the form
{
"user_name": "odespo",
"session_token": "QSoRairtJbO7XjvqwidsfkkXcYBSWEWKc0xhqf9m9wsTVvgpHowc9keItq9R5VkY1jq2RYH4mGXHEQL2O1kiBIjMq2VbzRhAouk4",
"time_to_die": "2024-07-23T03:05:57.141340172+00:00"
}If it fails you will get a 401 with the body content "Failed to parse time".