add: post titles

This commit is contained in:
trisua 2025-06-08 15:34:29 -04:00
parent 1279536609
commit 5b1db42c51
14 changed files with 230 additions and 13 deletions

View file

@ -90,6 +90,10 @@ pub fn routes() -> Router {
"/communities/{id}/banner",
get(communities::images::banner_request),
)
.route(
"/communities/{id}/supports_titles",
get(communities::communities::supports_titles_request),
)
// posts
.route("/posts", post(communities::posts::create_request))
.route("/posts/{id}", delete(communities::posts::delete_request))
@ -447,6 +451,8 @@ pub struct CreatePost {
pub answering: String,
#[serde(default)]
pub poll: Option<CreatePostPoll>,
#[serde(default)]
pub title: String,
}
#[derive(Deserialize)]