From 0c2fb7e973499a0423207c7e078aabab2f841742 Mon Sep 17 00:00:00 2001 From: Anonymous <58327725+lizzy-0323@users.noreply.github.com> Date: Thu, 26 Sep 2024 16:16:31 +0800 Subject: [PATCH] fix: lint problems in dashboard (#576) --- internal/dashboard/handler/alarm_handler.go | 3 +-- internal/dashboard/handler/obtenant_handler.go | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/dashboard/handler/alarm_handler.go b/internal/dashboard/handler/alarm_handler.go index f058d1920..bf2c8217a 100644 --- a/internal/dashboard/handler/alarm_handler.go +++ b/internal/dashboard/handler/alarm_handler.go @@ -23,7 +23,6 @@ import ( "github.com/oceanbase/ob-operator/internal/dashboard/model/alarm/rule" "github.com/oceanbase/ob-operator/internal/dashboard/model/alarm/silence" "github.com/oceanbase/ob-operator/internal/dashboard/model/job" - "github.com/oceanbase/ob-operator/pkg/errors" httpErr "github.com/oceanbase/ob-operator/pkg/errors" ) @@ -63,7 +62,7 @@ func ListAlerts(ctx *gin.Context) ([]alert.Alert, error) { // @Router /api/v1/alarm/alert/diagnose [POST] // @Security ApiKeyAuth func DiagnoseAlert(_ *gin.Context) (*job.Job, error) { - return nil, errors.NewNotImplemented("") + return nil, httpErr.NewNotImplemented("") } // @ID ListSilencers diff --git a/internal/dashboard/handler/obtenant_handler.go b/internal/dashboard/handler/obtenant_handler.go index d82c6eef2..4fb6d8574 100644 --- a/internal/dashboard/handler/obtenant_handler.go +++ b/internal/dashboard/handler/obtenant_handler.go @@ -32,7 +32,6 @@ import ( "github.com/oceanbase/ob-operator/internal/dashboard/model/param" "github.com/oceanbase/ob-operator/internal/dashboard/model/response" crypto "github.com/oceanbase/ob-operator/pkg/crypto" - "github.com/oceanbase/ob-operator/pkg/errors" httpErr "github.com/oceanbase/ob-operator/pkg/errors" "github.com/oceanbase/ob-operator/pkg/k8s/client" ) @@ -834,7 +833,7 @@ func ListOBTenantRelatedEvents(c *gin.Context) ([]response.K8sEvent, error) { // @Router /api/v1/obtenants/{namespace}/{name}/users [GET] // @Security ApiKeyAuth func ListOBTenantUsers(_ *gin.Context) ([]string, error) { - return nil, errors.NewNotImplemented("") + return nil, httpErr.NewNotImplemented("") } // @ID ListOBTenantDatabases @@ -852,5 +851,5 @@ func ListOBTenantUsers(_ *gin.Context) ([]string, error) { // @Router /api/v1/obtenants/{namespace}/{name}/databases [GET] // @Security ApiKeyAuth func ListOBTenantDatabases(_ *gin.Context) ([]string, error) { - return nil, errors.NewNotImplemented("") + return nil, httpErr.NewNotImplemented("") }