feat: Implement data import and export functionality for notes and tags.
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user