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

Function get_by_external_id

chirpstack/src/storage/user.rs:94–101  ·  view source on GitHub ↗
(external_id: &str)

Source from the content-addressed store, hash-verified

92}
93
94pub async fn get_by_external_id(external_id: &str) -> Result<User, Error> {
95 let u = user::dsl::user
96 .filter(user::dsl::external_id.eq(external_id))
97 .first(&mut get_async_db_conn().await?)
98 .await
99 .map_err(|e| Error::from_diesel(e, external_id.to_string()))?;
100 Ok(u)
101}
102
103pub async fn get_by_email_and_pw(email: &str, pw: &str) -> Result<User, Error> {
104 let u: User = match user::dsl::user

Callers 3

test_userFunction · 0.85
open_id_connect_loginMethod · 0.85
o_auth2_loginMethod · 0.85

Calls 2

to_stringMethod · 0.80
get_async_db_connFunction · 0.70

Tested by 1

test_userFunction · 0.68