Skip to content

Commit 48e332d

Browse files
fix: use find or create to get user
1 parent e023b8f commit 48e332d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/src/api/users.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub async fn get_user(pubkey: String) -> Result<User, ApiError> {
3030
let whitenoise = Whitenoise::get_instance()?;
3131
let pubkey = PublicKey::parse(&pubkey)?;
3232
let user = whitenoise
33-
.find_user_by_pubkey(&pubkey)
33+
.find_or_create_user_by_pubkey(&pubkey)
3434
.await
3535
.map_err(ApiError::from)?;
3636
Ok(user.into())

0 commit comments

Comments
 (0)