MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / get_by_email

Function get_by_email

chirpstack/src/storage/user.rs:85–92  ·  view source on GitHub ↗
(email: &str)

Source from the content-addressed store, hash-verified

83}
84
85pub async fn get_by_email(email: &str) -> Result<User, Error> {
86 let u = user::dsl::user
87 .filter(user::dsl::email.eq(email))
88 .first(&mut get_async_db_conn().await?)
89 .await
90 .map_err(|e| Error::from_diesel(e, email.to_string()))?;
91 Ok(u)
92}
93
94pub async fn get_by_external_id(external_id: &str) -> Result<User, Error> {
95 let u = user::dsl::user

Callers 3

open_id_connect_loginMethod · 0.85
o_auth2_loginMethod · 0.85
add_userMethod · 0.85

Calls 2

to_stringMethod · 0.80
get_async_db_connFunction · 0.70

Tested by

no test coverage detected