Plume/plume-api/src/posts.rs

12 lines
256 B
Rust
Raw Normal View History

2018-09-19 16:49:34 +02:00
use canapi::Endpoint;
#[derive(Default, Serialize, Deserialize)]
pub struct PostEndpoint {
pub id: Option<i32>,
pub title: Option<String>,
pub subtitle: Option<String>,
pub content: Option<String>
}
api!("/api/v1/posts" => PostEndpoint);