2019-08-15 15:02:52 +03:00
|
|
|
use crate::api::AppResult;
|
|
|
|
use log;
|
|
|
|
|
|
|
|
pub fn create_scheme() -> AppResult<()> {
|
|
|
|
Ok(log::info!("creating scheme"))
|
|
|
|
}
|
|
|
|
|
2019-08-15 19:10:13 +03:00
|
|
|
pub fn add_post(msg: String, username: String) -> AppResult<()> {
|
|
|
|
Ok(log::info!("add post {} {}", msg, username))
|
2019-08-15 15:02:52 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
pub fn get_all_posts() -> AppResult<String> {
|
|
|
|
log::info!("get all posts");
|
|
|
|
Ok("[]".to_string())
|
|
|
|
}
|
|
|
|
|
2019-08-16 12:00:50 +03:00
|
|
|
pub fn get_posts_by_username(username: String) -> AppResult<String> {
|
2019-08-15 19:10:13 +03:00
|
|
|
log::info!("get all posts by username {}", username);
|
2019-08-15 15:02:52 +03:00
|
|
|
Ok("[]".to_string())
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn get_posts_count() -> AppResult<i32> {
|
|
|
|
log::info!("get posts count");
|
|
|
|
Ok(0)
|
|
|
|
}
|