From 0f32b574cf6dc8b50f172eaf94b1debed603e0cc Mon Sep 17 00:00:00 2001 From: PR Date: Fri, 19 May 2023 09:35:44 -0700 Subject: [PATCH] can delete --- model/client/admin/data/can_delete_request.go | 2 +- model/client/admin/data/can_delete_test.go | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/model/client/admin/data/can_delete_request.go b/model/client/admin/data/can_delete_request.go index 57e9ef45..9d1f615d 100644 --- a/model/client/admin/data/can_delete_request.go +++ b/model/client/admin/data/can_delete_request.go @@ -7,7 +7,7 @@ import ( ) type CanDeleteRequest struct { - CanDelete common.LedgerSpecifier `json:"can_delete"` + CanDelete common.LedgerSpecifier `json:"can_delete,omitempty"` } func (*CanDeleteRequest) Method() string { diff --git a/model/client/admin/data/can_delete_test.go b/model/client/admin/data/can_delete_test.go index 81b429df..85876da9 100644 --- a/model/client/admin/data/can_delete_test.go +++ b/model/client/admin/data/can_delete_test.go @@ -20,7 +20,15 @@ func TestCanDeleteRequest(t *testing.T) { t.Error(err) } } +func TestCanDeleteRequestEmpty(t *testing.T) { + s := CanDeleteRequest{} + j := `{}` + + if err := test.SerializeAndDeserialize(t, s, j); err != nil { + t.Error(err) + } +} func TestCanDeleteResponse(t *testing.T) { s := CanDeleteResponse{ CanDelete: 54321,