@@ -409,7 +409,9 @@ impl ReadSide {
409409 . get_collection ( collection_id)
410410 . await
411411 . ok_or_else ( || ReadError :: NotFound ( collection_id) ) ?;
412- collection. check_read_api_key ( read_api_key, self . master_api_key ) ?;
412+ collection
413+ . check_read_api_key ( read_api_key, self . master_api_key )
414+ . await ?;
413415
414416 collection. stats ( req) . await
415417 }
@@ -428,7 +430,9 @@ impl ReadSide {
428430 . get_collection ( collection_id)
429431 . await
430432 . ok_or_else ( || ReadError :: NotFound ( collection_id) ) ?;
431- collection. check_read_api_key ( read_api_key, self . master_api_key ) ?;
433+ collection
434+ . check_read_api_key ( read_api_key, self . master_api_key )
435+ . await ?;
432436
433437 collection. batch_get_documents ( doc_id_strs) . await
434438 }
@@ -444,7 +448,9 @@ impl ReadSide {
444448 . get_collection ( collection_id)
445449 . await
446450 . ok_or_else ( || ReadError :: NotFound ( collection_id) ) ?;
447- collection. check_read_api_key ( read_api_key, self . master_api_key ) ?;
451+ collection
452+ . check_read_api_key ( read_api_key, self . master_api_key )
453+ . await ?;
448454
449455 let fields = collection. get_filterable_fields ( with_keys) . await ?;
450456
@@ -571,7 +577,9 @@ impl ReadSide {
571577 . get_collection ( collection_id)
572578 . await
573579 . ok_or_else ( || ReadError :: NotFound ( collection_id) ) ?;
574- collection. check_read_api_key ( read_api_key, self . master_api_key ) ?;
580+ collection
581+ . check_read_api_key ( read_api_key, self . master_api_key )
582+ . await ?;
575583
576584 // Extract extra claims from JWT token if present, otherwise use None for plain API key
577585 let claims: Option < HashMap < String , Value > > = match read_api_key {
@@ -628,7 +636,9 @@ impl ReadSide {
628636 . get_collection ( collection_id)
629637 . await
630638 . ok_or_else ( || ReadError :: NotFound ( collection_id) ) ?;
631- collection. check_read_api_key ( & read_api_key, self . master_api_key ) ?;
639+ collection
640+ . check_read_api_key ( & read_api_key, self . master_api_key )
641+ . await ?;
632642
633643 let collection_stats = self
634644 . collection_stats (
@@ -665,7 +675,9 @@ impl ReadSide {
665675 . get_collection ( collection_id)
666676 . await
667677 . ok_or_else ( || ReadError :: NotFound ( collection_id) ) ?;
668- collection. check_read_api_key ( read_api_key, self . master_api_key ) ?;
678+ collection
679+ . check_read_api_key ( read_api_key, self . master_api_key )
680+ . await ?;
669681
670682 let collection_stats = self
671683 . collection_stats (
@@ -697,7 +709,9 @@ impl ReadSide {
697709 None => return Err ( ReadError :: NotFound ( collection_id) ) ,
698710 Some ( collection) => collection,
699711 } ;
700- collection. check_read_api_key ( read_api_key, self . master_api_key ) ?;
712+ collection
713+ . check_read_api_key ( read_api_key, self . master_api_key )
714+ . await ?;
701715
702716 Ok ( collection)
703717 }
@@ -784,7 +798,9 @@ impl ReadSide {
784798 . await
785799 . ok_or_else ( || ReadError :: NotFound ( collection_id) ) ?;
786800
787- collection. check_read_api_key ( read_api_key, self . master_api_key )
801+ collection
802+ . check_read_api_key ( read_api_key, self . master_api_key )
803+ . await
788804 }
789805
790806 pub fn is_gpu_overloaded ( & self ) -> bool {
@@ -851,7 +867,9 @@ impl ReadSide {
851867 . get_collection ( collection_id)
852868 . await
853869 . ok_or_else ( || ReadError :: NotFound ( collection_id) ) ?;
854- collection. check_read_api_key ( read_api_key, self . master_api_key ) ?;
870+ collection
871+ . check_read_api_key ( read_api_key, self . master_api_key )
872+ . await ?;
855873
856874 let known_prompt: KnownPrompts = system_prompt_id
857875 . as_str ( )
@@ -874,7 +892,9 @@ impl ReadSide {
874892 . get_collection ( collection_id)
875893 . await
876894 . ok_or_else ( || ReadError :: NotFound ( collection_id) ) ?;
877- collection. check_read_api_key ( read_api_key, self . master_api_key ) ?;
895+ collection
896+ . check_read_api_key ( read_api_key, self . master_api_key )
897+ . await ?;
878898
879899 match self
880900 . training_sets
@@ -899,7 +919,10 @@ impl ReadSide {
899919 None => return Some ( Err ( ReadError :: NotFound ( collection_id) ) ) ,
900920 } ;
901921
902- if let Err ( e) = collection. check_read_api_key ( read_api_key, self . master_api_key ) {
922+ if let Err ( e) = collection
923+ . check_read_api_key ( read_api_key, self . master_api_key )
924+ . await
925+ {
903926 return Some ( Err ( e) ) ;
904927 }
905928
0 commit comments