add reposts/quotes

fix #2
This commit is contained in:
trisua 2025-04-10 18:16:52 -04:00
parent 15e24b9a61
commit df32b9d65e
43 changed files with 708 additions and 234 deletions

View file

@ -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,