Remove the last k8s import on restapi (#877)
* Remove the last k8s import on restapi Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
@@ -79,7 +79,7 @@ func getNotificationEndpoints(ctx context.Context, client MinioAdmin) (*models.N
|
||||
func getNotificationEndpointsResponse(session *models.Principal) (*models.NotifEndpointResponse, *models.Error) {
|
||||
mAdmin, err := NewMinioAdminClient(session)
|
||||
if err != nil {
|
||||
return nil, PrepareError(err)
|
||||
return nil, prepareError(err)
|
||||
}
|
||||
// create a minioClient interface implementation
|
||||
// defining the client to be used
|
||||
@@ -90,7 +90,7 @@ func getNotificationEndpointsResponse(session *models.Principal) (*models.NotifE
|
||||
// serialize output
|
||||
notfEndpointResp, err := getNotificationEndpoints(ctx, adminClient)
|
||||
if err != nil {
|
||||
return nil, PrepareError(err)
|
||||
return nil, prepareError(err)
|
||||
}
|
||||
return notfEndpointResp, nil
|
||||
}
|
||||
@@ -150,7 +150,7 @@ func addNotificationEndpoint(ctx context.Context, client MinioAdmin, params *adm
|
||||
func getAddNotificationEndpointResponse(session *models.Principal, params *admin_api.AddNotificationEndpointParams) (*models.SetNotificationEndpointResponse, *models.Error) {
|
||||
mAdmin, err := NewMinioAdminClient(session)
|
||||
if err != nil {
|
||||
return nil, PrepareError(err)
|
||||
return nil, prepareError(err)
|
||||
}
|
||||
// create a minioClient interface implementation
|
||||
// defining the client to be used
|
||||
@@ -161,7 +161,7 @@ func getAddNotificationEndpointResponse(session *models.Principal, params *admin
|
||||
// serialize output
|
||||
notfEndpointResp, err := addNotificationEndpoint(ctx, adminClient, params)
|
||||
if err != nil {
|
||||
return nil, PrepareError(err)
|
||||
return nil, prepareError(err)
|
||||
}
|
||||
return notfEndpointResp, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user