diff --git a/pkg/query-service/app/dashboards/model.go b/pkg/query-service/app/dashboards/model.go index 8f05b44f18..c7429e07f8 100644 --- a/pkg/query-service/app/dashboards/model.go +++ b/pkg/query-service/app/dashboards/model.go @@ -9,7 +9,6 @@ import ( "strings" "time" - "github.com/SigNoz/signoz/pkg/query-service/interfaces" "github.com/SigNoz/signoz/pkg/query-service/model" "github.com/SigNoz/signoz/pkg/sqlstore" "github.com/SigNoz/signoz/pkg/types" @@ -41,7 +40,7 @@ func InitDB(sqlStore sqlstore.SQLStore) error { } // CreateDashboard creates a new dashboard -func CreateDashboard(ctx context.Context, orgID string, email string, data map[string]interface{}, fm interfaces.FeatureLookup) (*types.Dashboard, *model.ApiError) { +func CreateDashboard(ctx context.Context, orgID string, email string, data map[string]interface{}) (*types.Dashboard, *model.ApiError) { dash := &types.Dashboard{ Data: data, } @@ -77,7 +76,7 @@ func GetDashboards(ctx context.Context, orgID string) ([]types.Dashboard, *model return dashboards, nil } -func DeleteDashboard(ctx context.Context, orgID, uuid string, fm interfaces.FeatureLookup) *model.ApiError { +func DeleteDashboard(ctx context.Context, orgID, uuid string) *model.ApiError { dashboard, dErr := GetDashboard(ctx, orgID, uuid) if dErr != nil { @@ -116,7 +115,7 @@ func GetDashboard(ctx context.Context, orgID, uuid string) (*types.Dashboard, *m return &dashboard, nil } -func UpdateDashboard(ctx context.Context, orgID, userEmail, uuid string, data map[string]interface{}, fm interfaces.FeatureLookup) (*types.Dashboard, *model.ApiError) { +func UpdateDashboard(ctx context.Context, orgID, userEmail, uuid string, data map[string]interface{}) (*types.Dashboard, *model.ApiError) { mapData, err := json.Marshal(data) if err != nil { diff --git a/pkg/query-service/app/http_handler.go b/pkg/query-service/app/http_handler.go index 91af39f57e..255be26499 100644 --- a/pkg/query-service/app/http_handler.go +++ b/pkg/query-service/app/http_handler.go @@ -1148,7 +1148,7 @@ func (aH *APIHandler) deleteDashboard(w http.ResponseWriter, r *http.Request) { render.Error(w, errorsV2.Newf(errorsV2.TypeUnauthenticated, errorsV2.CodeUnauthenticated, "unauthenticated")) return } - err := dashboards.DeleteDashboard(r.Context(), claims.OrgID, uuid, aH.featureFlags) + err := dashboards.DeleteDashboard(r.Context(), claims.OrgID, uuid) if err != nil { RespondError(w, err, nil) @@ -1240,7 +1240,7 @@ func (aH *APIHandler) updateDashboard(w http.ResponseWriter, r *http.Request) { render.Error(w, errorsV2.Newf(errorsV2.TypeUnauthenticated, errorsV2.CodeUnauthenticated, "unauthenticated")) return } - dashboard, apiError := dashboards.UpdateDashboard(r.Context(), claims.OrgID, claims.Email, uuid, postData, aH.featureFlags) + dashboard, apiError := dashboards.UpdateDashboard(r.Context(), claims.OrgID, claims.Email, uuid, postData) if apiError != nil { RespondError(w, apiError, nil) return @@ -1313,7 +1313,7 @@ func (aH *APIHandler) createDashboards(w http.ResponseWriter, r *http.Request) { render.Error(w, errorsV2.Newf(errorsV2.TypeUnauthenticated, errorsV2.CodeUnauthenticated, "unauthenticated")) return } - dash, apiErr := dashboards.CreateDashboard(r.Context(), claims.OrgID, claims.Email, postData, aH.featureFlags) + dash, apiErr := dashboards.CreateDashboard(r.Context(), claims.OrgID, claims.Email, postData) if apiErr != nil { RespondError(w, apiErr, nil)