From f4e0d6ae6244ccd41381f2de6acb8229a54d7401 Mon Sep 17 00:00:00 2001 From: Ben McClelland Date: Tue, 28 May 2024 15:59:10 -0700 Subject: [PATCH] fix: correct error message for delete user --- cmd/versitygw/admin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/versitygw/admin.go b/cmd/versitygw/admin.go index 306b9e9..0a86864 100644 --- a/cmd/versitygw/admin.go +++ b/cmd/versitygw/admin.go @@ -178,7 +178,7 @@ func createUser(ctx *cli.Context) error { access, secret, role := ctx.String("access"), ctx.String("secret"), ctx.String("role") userID, groupID, projectID := ctx.Int("user-id"), ctx.Int("group-id"), ctx.Int("projectID") if access == "" || secret == "" { - return fmt.Errorf("invalid input parameters for the new user") + return fmt.Errorf("invalid input parameters for the new user access/secret keys") } if role != string(auth.RoleAdmin) && role != string(auth.RoleUser) && role != string(auth.RoleUserPlus) { return fmt.Errorf("invalid input parameter for role: %v", role) @@ -240,7 +240,7 @@ func createUser(ctx *cli.Context) error { func deleteUser(ctx *cli.Context) error { access := ctx.String("access") if access == "" { - return fmt.Errorf("invalid input parameter for the new user") + return fmt.Errorf("invalid input parameter for the user access key") } req, err := http.NewRequest(http.MethodPatch, fmt.Sprintf("%v/delete-user?access=%v", adminEndpoint, access), nil)