Work on getting notes API
This commit is contained in:
parent
f656757710
commit
8a4c19dd17
9 changed files with 153 additions and 11 deletions
|
@ -5,7 +5,6 @@ package server
|
|||
import "time"
|
||||
|
||||
var (
|
||||
_ = linstromNote{}
|
||||
_ = linstromRole{}
|
||||
_ = linstromRelation{}
|
||||
)
|
||||
|
@ -29,6 +28,7 @@ type linstromNote struct {
|
|||
AccessLevel uint8 `jsonapi:"attr,access-level"`
|
||||
Pings []*linstromAccount `jsonapi:"relation,pings,omitempty"`
|
||||
PingIds []string `jsonapi:"attr,ping-ids,omitempty"`
|
||||
ReactionIds []uint `jsonapi:"attr,reaction-ids"`
|
||||
}
|
||||
|
||||
type linstromOriginServer struct {
|
||||
|
@ -100,6 +100,23 @@ type linstromRelation struct {
|
|||
Accepted bool `jsonapi:"attr,accepted"`
|
||||
}
|
||||
|
||||
type linstromReaction struct {
|
||||
Id uint `jsonapi:"primary,reactions"`
|
||||
NoteId string `jsonapi:"attr,note-id"`
|
||||
ReactorId string `jsonapi:"attr,reactor-id"`
|
||||
EmoteId uint `jsonapi:"attr,emote-id"`
|
||||
Emote *linstromEmote `jsonapi:"relation,emote"`
|
||||
}
|
||||
|
||||
type linstromEmote struct {
|
||||
Id uint `jsonapi:"primary,emotes"`
|
||||
MetadataId string `jsonapi:"attr,metadata-id"`
|
||||
Metadata *linstromMediaMetadata `jsonapi:"relation,metadata"`
|
||||
Name string `jsonapi:"attr,name"`
|
||||
ServerId uint `jsonapi:"attr,server-id"`
|
||||
Server *linstromOriginServer `jsonapi:"relation,server"`
|
||||
}
|
||||
|
||||
// Role is essentially just a carbon copy of storage/roles.go
|
||||
type linstromRole struct {
|
||||
Id uint `jsonapi:"primary,roles"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue