add: implement 9 new scopes, 21 new api endpoints
This commit is contained in:
parent
c3139ef1d2
commit
8f16068a34
14 changed files with 973 additions and 35 deletions
|
@ -28,6 +28,18 @@ impl DataManager {
|
|||
|
||||
auto_method!(get_userfollow_by_id()@get_userfollow_from_row -> "SELECT * FROM userfollows WHERE id = $1" --name="user follow" --returns=UserFollow --cache-key-tmpl="atto.userfollow:{}");
|
||||
|
||||
/// Filter to update userfollows to clean their users for public APIs.
|
||||
pub fn userfollows_user_filter(&self, x: &Vec<(UserFollow, User)>) -> Vec<(UserFollow, User)> {
|
||||
let mut out: Vec<(UserFollow, User)> = Vec::new();
|
||||
|
||||
for mut y in x.clone() {
|
||||
y.1.clean();
|
||||
out.push(y);
|
||||
}
|
||||
|
||||
out
|
||||
}
|
||||
|
||||
/// Get a user follow by `initiator` and `receiver` (in that order).
|
||||
pub async fn get_userfollow_by_initiator_receiver(
|
||||
&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue