feat: add discriminator and display name fields

This commit is contained in:
Paul Makles
2023-06-09 16:34:18 +01:00
parent aba5c7d8af
commit 31c7dc0577
16 changed files with 229 additions and 64 deletions
+4 -3
View File
@@ -9,11 +9,12 @@ impl AbstractUser for DummyDb {
Ok(User {
id: id.into(),
username: "username".into(),
discriminator: "0000".into(),
..Default::default()
})
}
async fn fetch_user_by_username(&self, username: &str) -> Result<User> {
async fn fetch_user_by_username(&self, username: &str, _discriminator: &str) -> Result<User> {
self.fetch_user(username).await
}
@@ -45,8 +46,8 @@ impl AbstractUser for DummyDb {
Ok(vec![self.fetch_user("id").await.unwrap()])
}
async fn is_username_taken(&self, _username: &str) -> Result<bool> {
Ok(false)
async fn fetch_discriminators_in_use(&self, _username: &str) -> Result<Vec<String>> {
Ok(vec![])
}
async fn fetch_mutual_user_ids(&self, _user_a: &str, _user_b: &str) -> Result<Vec<String>> {