22
33use crate :: {
44 error:: { HttpCommonError , HttpErrorResponse , HttpResult , HttpStatusResult } ,
5- middleware:: tenant:: { TenantDb , TenantParams , TenantSearch , TenantStorage } ,
5+ middleware:: tenant:: { TenantDb , TenantParams , TenantSearch } ,
66 models:: admin:: { TenantDocumentBoxesRequest , TenantDocumentBoxesResponse , TenantStatsResponse } ,
77} ;
88use axum:: { Extension , Json , http:: StatusCode } ;
@@ -242,26 +242,8 @@ pub async fn search_tenant(
242242 params( TenantParams )
243243) ]
244244#[ tracing:: instrument( skip_all) ]
245- pub async fn reprocess_octet_stream_files_tenant (
246- TenantDb ( _db) : TenantDb ,
247- TenantSearch ( _search) : TenantSearch ,
248- TenantStorage ( _storage) : TenantStorage ,
249- // Extension(processing): Extension<ProcessingLayer>,
250- ) -> HttpStatusResult {
251- // TODO: This is a heavy and long running operation, should be moved to client side only
252- // docbox_core::files::reprocess_octet_stream_files::reprocess_octet_stream_files(
253- // &db,
254- // &search,
255- // &storage,
256- // &processing,
257- // )
258- // .await
259- // .map_err(|error| {
260- // tracing::error!(?error, "failed to reprocess octet-stream files");
261- // HttpCommonError::ServerError
262- // })?;
263-
264- Ok ( StatusCode :: NO_CONTENT )
245+ pub async fn reprocess_octet_stream_files_tenant ( ) -> HttpStatusResult {
246+ Err ( HttpCommonError :: Unsupported . into ( ) )
265247}
266248
267249/// Rebuild search index
@@ -280,19 +262,8 @@ pub async fn reprocess_octet_stream_files_tenant(
280262 params( TenantParams )
281263) ]
282264#[ tracing:: instrument( skip_all) ]
283- pub async fn rebuild_search_index_tenant ( // TenantDb(db): TenantDb,
284- // TenantSearch(search): TenantSearch,
285- // TenantStorage(storage): TenantStorage,
286- ) -> HttpStatusResult {
287- // TODO: This is a heavy and long running operation, should be moved to client side only
288- // docbox_core::tenant::rebuild_tenant_index::rebuild_tenant_index(&db, &search, &storage)
289- // .await
290- // .map_err(|error| {
291- // tracing::error!(?error, "failed to rebuilt tenant search index");
292- // HttpCommonError::ServerError
293- // })?;
294-
295- Ok ( StatusCode :: NO_CONTENT )
265+ pub async fn rebuild_search_index_tenant ( ) -> HttpStatusResult {
266+ Err ( HttpCommonError :: Unsupported . into ( ) )
296267}
297268
298269/// Flush database cache
0 commit comments