versia-go/pkg/lysand/action_undo.go

20 lines
368 B
Go
Raw Normal View History

2024-08-11 03:51:22 +02:00
package lysand
import "encoding/json"
type Undo struct {
Entity
// Author is the URL to the user that triggered the undo action
Author *URL `json:"author"`
// Object is the URL to the object that was undone
Object *URL `json:"object"`
}
func (u Undo) MarshalJSON() ([]byte, error) {
type undo Undo
u2 := undo(u)
u2.Type = "Undo"
return json.Marshal(u2)
}