Plume/plume-api/src/posts.rs

20 lines
529 B
Rust
Raw Normal View History

2018-09-19 16:49:34 +02:00
use canapi::Endpoint;
2018-12-24 16:42:40 +01:00
#[derive(Clone, Default, Serialize, Deserialize)]
2018-09-19 16:49:34 +02:00
pub struct PostEndpoint {
pub id: Option<i32>,
pub title: Option<String>,
pub subtitle: Option<String>,
2018-12-24 16:42:40 +01:00
pub content: Option<String>,
pub source: Option<String>,
pub author: Option<String>,
pub blog_id: Option<i32>,
pub published: Option<bool>,
pub creation_date: Option<String>,
pub license: Option<String>,
pub tags: Option<Vec<String>>,
pub cover_id: Option<i32>,
2018-09-19 16:49:34 +02:00
}
api!("/api/v1/posts" => PostEndpoint);