feat: Implement data import and export functionality for notes and tags.

This commit is contained in:
2025-12-23 02:27:26 +01:00
parent 2ee9de866a
commit e4f021a68f
6 changed files with 200 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
//! Route definitions and module structure
pub mod auth;
pub mod import_export;
pub mod notes;
pub mod tags;
@@ -29,6 +30,9 @@ pub fn api_v1_router() -> Router<AppState> {
)
// Search route
.route("/search", get(notes::search_notes))
// Import/Export routes
.route("/export", get(import_export::export_data))
.route("/import", post(import_export::import_data))
// Tag routes
.route("/tags", get(tags::list_tags).post(tags::create_tag))
.route("/tags/{id}", delete(tags::delete_tag))