mirror of
https://github.com/versia-pub/versia-go.git
synced 2025-12-06 14:28:20 +01:00
20 lines
368 B
Go
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)
|
||
|
|
}
|