[Bug] Fix annotations update/patch (#60385)

* fix annotations update/patch

* verify that when update doesn't contain data, we will not update data
This commit is contained in:
ying-jeanne
2022-12-26 22:53:52 +08:00
committed by GitHub
parent 746c7839dc
commit 12c292fd44
4 changed files with 63 additions and 11 deletions

View File

@ -15,19 +15,21 @@ type PostAnnotationsCmd struct {
}
type UpdateAnnotationsCmd struct {
Id int64 `json:"id"`
Time int64 `json:"time"`
TimeEnd int64 `json:"timeEnd,omitempty"` // Optional
Text string `json:"text"`
Tags []string `json:"tags"`
Id int64 `json:"id"`
Time int64 `json:"time"`
TimeEnd int64 `json:"timeEnd,omitempty"` // Optional
Text string `json:"text"`
Tags []string `json:"tags"`
Data *simplejson.Json `json:"data"`
}
type PatchAnnotationsCmd struct {
Id int64 `json:"id"`
Time int64 `json:"time"`
TimeEnd int64 `json:"timeEnd,omitempty"` // Optional
Text string `json:"text"`
Tags []string `json:"tags"`
Id int64 `json:"id"`
Time int64 `json:"time"`
TimeEnd int64 `json:"timeEnd,omitempty"` // Optional
Text string `json:"text"`
Tags []string `json:"tags"`
Data *simplejson.Json `json:"data"`
}
type MassDeleteAnnotationsCmd struct {