Skip to content

Conversation

@Ad96el
Copy link
Contributor

@Ad96el Ad96el commented May 7, 2024

Some minor improvements

Some minor changes. There is no need to store the sessions in the database. Instead, the session data is stored in a session cookie.

Let's hope, it does not break again.

@Ad96el Ad96el requested a review from abdulmth May 7, 2024 14:29
Comment on lines +44 to +45
.map_err(|_| AppError::Challenge("Session not set"))?
.ok_or(AppError::Challenge("Session not set"))?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double mapping of error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get an option after the map_err that's why the ok_or is called. Do you know a smooth way to directly transform it into Result<String, AppError>?

Comment on lines +31 to +32
.map_err(|_| AppError::Challenge("Session not set"))?
.ok_or(AppError::Challenge("Session not set"))?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants