add: post comments
add: user follow api, user block api
This commit is contained in:
parent
559ce19932
commit
8580e34be2
18 changed files with 296 additions and 49 deletions
|
@ -14,8 +14,8 @@ impl DataManager {
|
|||
};
|
||||
|
||||
execute!(&conn, common::CREATE_TABLE_USERS).unwrap();
|
||||
execute!(&conn, common::CREATE_TABLE_PAGES).unwrap();
|
||||
execute!(&conn, common::CREATE_TABLE_ENTRIES).unwrap();
|
||||
execute!(&conn, common::CREATE_TABLE_JOURNALS).unwrap();
|
||||
execute!(&conn, common::CREATE_TABLE_POSTS).unwrap();
|
||||
execute!(&conn, common::CREATE_TABLE_MEMBERSHIPS).unwrap();
|
||||
execute!(&conn, common::CREATE_TABLE_REACTIONS).unwrap();
|
||||
execute!(&conn, common::CREATE_TABLE_NOTIFICATIONS).unwrap();
|
||||
|
@ -99,7 +99,9 @@ macro_rules! auto_method {
|
|||
Err(e) => return Err(Error::DatabaseConnection(e.to_string())),
|
||||
};
|
||||
|
||||
let res = query_row!(&conn, $query, &[&selector], |x| { Ok(Self::$select_fn(x)) });
|
||||
let res = query_row!(&conn, $query, &[&selector.to_string()], |x| {
|
||||
Ok(Self::$select_fn(x))
|
||||
});
|
||||
|
||||
if res.is_err() {
|
||||
return Err(Error::GeneralNotFound($name_.to_string()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue