@@ -5,8 +5,8 @@ use rustapi_rs::prelude::*;
55use std:: sync:: Arc ;
66
77use crate :: models:: {
8- Bookmark , BookmarkEvent , BookmarkListParams , BookmarkResponse , Claims ,
9- CreateBookmarkRequest , PaginatedResponse , UpdateBookmarkRequest ,
8+ Bookmark , BookmarkEvent , BookmarkListParams , BookmarkResponse , Claims , CreateBookmarkRequest ,
9+ PaginatedResponse , UpdateBookmarkRequest ,
1010} ;
1111use crate :: stores:: AppState ;
1212
@@ -97,7 +97,6 @@ async fn create_bookmark(
9797 Created ( response)
9898}
9999
100-
101100/// Get a single bookmark by ID
102101async fn get_bookmark (
103102 State ( state) : State < Arc < AppState > > ,
@@ -196,7 +195,9 @@ async fn delete_bookmark(
196195 state. bookmarks . delete ( id) . await ;
197196
198197 // Broadcast SSE event
199- state. sse_broadcaster . broadcast ( BookmarkEvent :: Deleted { id } ) ;
198+ state
199+ . sse_broadcaster
200+ . broadcast ( BookmarkEvent :: Deleted { id } ) ;
200201
201202 Ok ( NoContent )
202203}
@@ -214,7 +215,10 @@ async fn export_bookmarks(
214215 . into_iter ( )
215216 . map ( |b| {
216217 let category_name = b. category_id . and_then ( |cid| {
217- categories. iter ( ) . find ( |c| c. id == cid) . map ( |c| c. name . clone ( ) )
218+ categories
219+ . iter ( )
220+ . find ( |c| c. id == cid)
221+ . map ( |c| c. name . clone ( ) )
218222 } ) ;
219223
220224 crate :: models:: BookmarkExport {
@@ -258,7 +262,11 @@ async fn import_bookmarks(
258262
259263 // Find or create category
260264 let category_id = if let Some ( ref name) = export. category_name {
261- state. categories . find_by_name ( user_id, name) . await . map ( |c| c. id )
265+ state
266+ . categories
267+ . find_by_name ( user_id, name)
268+ . await
269+ . map ( |c| c. id )
262270 } else {
263271 None
264272 } ;
@@ -287,7 +295,6 @@ async fn import_bookmarks(
287295 } )
288296}
289297
290-
291298// Route functions
292299pub fn list_bookmarks_route ( ) -> Route {
293300 get_route ( "/bookmarks" , list_bookmarks)
0 commit comments