versia-go/pkg/lysand/action_undo.go
2024-08-13 01:18:14 +02:00

20 lines
368 B
Go

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)
}