This commit is contained in:
2023-08-22 15:28:39 +03:00
parent 1c59ca338a
commit a3711057ba
18 changed files with 901 additions and 9 deletions

View File

@@ -162,7 +162,7 @@ type ListACL []ACL
// History information
type History struct {
// GUID
GUID uint64 `json:"guid"`
GUID GUID `json:"guid"`
// ID
ID uint64 `json:"id"`
@@ -171,6 +171,20 @@ type History struct {
Timestamp uint64 `json:"timestamp"`
}
type GUID string
func (r *GUID) UnmarshalJSON(b []byte) error {
if b[0] == '"' {
*r = GUID(string(b[1:len(b)-1]))
return nil
}
*r = GUID(string(b))
return nil
}
// List history
type ListHistory []History