parent
15e24b9a61
commit
df32b9d65e
43 changed files with 708 additions and 234 deletions
|
@ -81,6 +81,10 @@ pub fn routes() -> Router {
|
|||
// posts
|
||||
.route("/posts", post(communities::posts::create_request))
|
||||
.route("/posts/{id}", delete(communities::posts::delete_request))
|
||||
.route(
|
||||
"/posts/{id}/repost",
|
||||
post(communities::posts::create_repost_request),
|
||||
)
|
||||
.route(
|
||||
"/posts/{id}/content",
|
||||
post(communities::posts::update_content_request),
|
||||
|
@ -247,6 +251,12 @@ pub struct CreatePost {
|
|||
pub replying_to: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct CreateRepost {
|
||||
pub content: String,
|
||||
pub community: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct UpdatePostContent {
|
||||
pub content: String,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue