Skip to content

Instantly share code, notes, and snippets.

@mike820324
Created October 4, 2021 13:46
Show Gist options
  • Save mike820324/9d7a6a780555dbf8ed2e68ae9014d001 to your computer and use it in GitHub Desktop.
Save mike820324/9d7a6a780555dbf8ed2e68ae9014d001 to your computer and use it in GitHub Desktop.
async fn index(id: Identity) -> String {
// access request identity
if let Some(id) = id.identity() {
format!("Welcome! {}", id)
} else {
"Welcome Anonymous!".to_owned()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment