add: global notes
This commit is contained in:
parent
59581f69c9
commit
2cd04b0db0
24 changed files with 371 additions and 608 deletions
|
@ -588,6 +588,8 @@ pub fn routes() -> Router {
|
|||
.route("/notes/{id}/content", post(notes::update_content_request))
|
||||
.route("/notes/{id}/dir", post(notes::update_dir_request))
|
||||
.route("/notes/{id}/tags", post(notes::update_tags_request))
|
||||
.route("/notes/{id}/global", post(notes::publish_request))
|
||||
.route("/notes/{id}/global", delete(notes::unpublish_request))
|
||||
.route("/notes/from_journal/{id}", get(notes::list_request))
|
||||
.route("/notes/preview", post(notes::render_markdown_request))
|
||||
.route(
|
||||
|
@ -597,18 +599,6 @@ pub fn routes() -> Router {
|
|||
// uploads
|
||||
.route("/uploads/{id}", get(uploads::get_request))
|
||||
.route("/uploads/{id}", delete(uploads::delete_request))
|
||||
// links
|
||||
.route("/links", get(auth::links::list_request))
|
||||
.route("/links", post(auth::links::create_request))
|
||||
.route("/links/{id}", get(auth::links::get_request))
|
||||
.route("/links/{id}", delete(auth::links::delete_request))
|
||||
.route("/links/icon", post(auth::links::upload_icon_request))
|
||||
.route("/links/{id}/label", post(auth::links::update_label_request))
|
||||
.route("/links/{id}/href", post(auth::links::update_href_request))
|
||||
.route(
|
||||
"/links/{id}/position",
|
||||
post(auth::links::update_position_request),
|
||||
)
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
@ -982,29 +972,3 @@ pub struct RemoveJournalDir {
|
|||
pub struct UpdateNoteTags {
|
||||
pub tags: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct CreateLink {
|
||||
pub label: String,
|
||||
pub href: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct UpdateLinkLabel {
|
||||
pub label: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct UpdateLinkHref {
|
||||
pub href: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct UpdateLinkPosition {
|
||||
pub position: i32,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct UploadLinkIcon {
|
||||
pub id: String,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue