From dca35bde877aab6e64ef51b52e590b5d48f692f9 Mon Sep 17 00:00:00 2001 From: boojack Date: Fri, 23 Dec 2022 18:38:24 +0800 Subject: [PATCH] fix: disable decode patch id (#831) --- api/memo.go | 2 +- api/resource.go | 2 +- api/shortcut.go | 2 +- api/user.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/memo.go b/api/memo.go index 29d0ebe66bb81..01aa42ff003ca 100644 --- a/api/memo.go +++ b/api/memo.go @@ -57,7 +57,7 @@ type MemoCreate struct { } type MemoPatch struct { - ID int + ID int `json:"-"` // Standard fields CreatedTs *int64 `json:"createdTs"` diff --git a/api/resource.go b/api/resource.go index b833f913c1d12..90e47c7f789ee 100644 --- a/api/resource.go +++ b/api/resource.go @@ -41,7 +41,7 @@ type ResourceFind struct { } type ResourcePatch struct { - ID int + ID int `json:"-"` // Standard fields UpdatedTs *int64 diff --git a/api/shortcut.go b/api/shortcut.go index b4aa803a5d458..5eaedd3ccc572 100644 --- a/api/shortcut.go +++ b/api/shortcut.go @@ -24,7 +24,7 @@ type ShortcutCreate struct { } type ShortcutPatch struct { - ID int + ID int `json:"-"` // Standard fields UpdatedTs *int64 diff --git a/api/user.go b/api/user.go index 4e6afec026ff8..529f3fc22e57f 100644 --- a/api/user.go +++ b/api/user.go @@ -69,7 +69,7 @@ func (create UserCreate) Validate() error { } type UserPatch struct { - ID int + ID int `json:"-"` // Standard fields UpdatedTs *int64