Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(dss): load the document before internal routes that need it (#7899)
teoa78ec09bdca3
diff --git a/services/document_storage_service/src/api/internal.rs b/services/document_storage_service/src/api/internal.rsindex 9e0fbed51f..e1210b04c4 100644--- a/services/document_storage_service/src/api/internal.rs+++ b/services/document_storage_service/src/api/internal.rs@@ -73,19 +73,20 @@ pub fn router(state: ApiContext) -> Router<ApiContext> {).route("/documents/{document_id}/export",- get(export_document::handler),+ get(export_document::handler).layer(ensure_document_exists_middleware.clone()),).route("/documents/{document_id}/text",- get(get_document_text::handler),+ get(get_document_text::handler).layer(ensure_document_exists_middleware.clone()),).route("/documents/{document_id}/full_pdf_modification_data",- get(get_full_pdf_modification_data::handler),+ get(get_full_pdf_modification_data::handler)+ .layer(ensure_document_exists_middleware.clone()),).route("/documents/{document_id}/location",- get(location::get_location_handler),+ get(location::get_location_handler).layer(ensure_document_exists_middleware.clone()),).route("/documents/{document_id}/location_v3",@@ -99,7 +100,8 @@ pub fn router(state: ApiContext) -> Router<ApiContext> {).route("/documents/{document_id}/permissions",- get(get_document_permissions::get_document_permissions_handler),+ get(get_document_permissions::get_document_permissions_handler)+ .layer(ensure_document_exists_middleware.clone()),).route("/documents/{document_id}/access_level",@@ -125,15 +127,17 @@ pub fn router(state: ApiContext) -> Router<ApiContext> {).route("/documents/{document_id}",- put(save_document::save_document_handler),+ put(save_document::save_document_handler)+ .layer(ensure_document_exists_middleware.clone()),).route("/documents/{document_id}/{document_version_id}",- get(get_document_version::handler),+ get(get_document_version::handler).layer(ensure_document_exists_middleware.clone()),).route("/documents/{document_id}/{document_version_id}/key",- get(get_document_key::get_document_key_handler),+ get(get_document_key::get_document_key_handler)+ .layer(ensure_document_exists_middleware.clone()),).route("/documents/{document_id}/snapshot",