Replace getStorageForRequest with s.storage (bd-32)
- Replaced all getStorageForRequest(req) calls with direct s.storage access - Updated 5 handler files: server_issues_epics.go (~8 calls), server_labels_deps_comments.go (~4 calls), server_compact.go (~2 calls), server_export_import_auto.go (~2 calls), server_routing_validation_diagnostics.go (~1 call) - Only remaining references are in server_cache_storage.go (to be deleted in bd-33) and server_eviction_test.go (to be deleted in bd-34) - Part of bd-29 epic to remove daemon storage cache Amp-Thread-ID: https://ampcode.com/threads/T-239a5531-68a5-4c98-b85d-0e3512b2553c Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -25,13 +25,7 @@ func (s *Server) handleExport(req *Request) Response {
|
||||
}
|
||||
}
|
||||
|
||||
store, err := s.getStorageForRequest(req)
|
||||
if err != nil {
|
||||
return Response{
|
||||
Success: false,
|
||||
Error: fmt.Sprintf("failed to get storage: %v", err),
|
||||
}
|
||||
}
|
||||
store := s.storage
|
||||
|
||||
ctx := s.reqCtx(req)
|
||||
|
||||
@@ -171,10 +165,7 @@ func (s *Server) handleImport(req *Request) Response {
|
||||
// This fixes bd-132: daemon shows stale data after git pull
|
||||
func (s *Server) checkAndAutoImportIfStale(req *Request) error {
|
||||
// Get storage for this request
|
||||
store, err := s.getStorageForRequest(req)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get storage: %w", err)
|
||||
}
|
||||
store := s.storage
|
||||
|
||||
ctx := s.reqCtx(req)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user