diff options
author | Dessalines <tyhou13@gmx.com> | 2019-12-29 15:39:48 -0500 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-12-29 15:39:48 -0500 |
commit | a4428528e30b18eb85596edf9c26bc8b6b7d11ee (patch) | |
tree | 450f5662ada20a7f66f809033d57fbc12dcc963d /server/src/db/comment_view.rs | |
parent | 106aaf4f28ef34d68848f48e5673f955a04b6deb (diff) |
Adding user avatars / icons. Requires pictshare.
- Fixes #188
Diffstat (limited to 'server/src/db/comment_view.rs')
-rw-r--r-- | server/src/db/comment_view.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server/src/db/comment_view.rs b/server/src/db/comment_view.rs index 5c321e2e..c56da51d 100644 --- a/server/src/db/comment_view.rs +++ b/server/src/db/comment_view.rs @@ -18,6 +18,7 @@ table! { banned -> Bool, banned_from_community -> Bool, creator_name -> Varchar, + creator_avatar -> Nullable<Text>, score -> BigInt, upvotes -> BigInt, downvotes -> BigInt, @@ -46,6 +47,7 @@ pub struct CommentView { pub banned: bool, pub banned_from_community: bool, pub creator_name: String, + pub creator_avatar: Option<String>, pub score: i64, pub upvotes: i64, pub downvotes: i64, @@ -226,6 +228,7 @@ table! { banned -> Bool, banned_from_community -> Bool, creator_name -> Varchar, + creator_avatar -> Nullable<Text>, score -> BigInt, upvotes -> BigInt, downvotes -> BigInt, @@ -255,6 +258,7 @@ pub struct ReplyView { pub banned: bool, pub banned_from_community: bool, pub creator_name: String, + pub creator_avatar: Option<String>, pub score: i64, pub upvotes: i64, pub downvotes: i64, @@ -368,6 +372,7 @@ mod tests { preferred_username: None, password_encrypted: "nope".into(), email: None, + avatar: None, admin: false, banned: false, updated: None, @@ -447,6 +452,7 @@ mod tests { published: inserted_comment.published, updated: None, creator_name: inserted_user.name.to_owned(), + creator_avatar: None, score: 1, downvotes: 0, upvotes: 1, @@ -470,6 +476,7 @@ mod tests { published: inserted_comment.published, updated: None, creator_name: inserted_user.name.to_owned(), + creator_avatar: None, score: 1, downvotes: 0, upvotes: 1, |