add missing fields to note json
This commit is contained in:
parent
ef487958b6
commit
3034f194c7
1 changed files with 5 additions and 1 deletions
|
@ -47,13 +47,17 @@ data Collection order a
|
||||||
|
|
||||||
instance A.ToJSON Note where
|
instance A.ToJSON Note where
|
||||||
toJSON note =
|
toJSON note =
|
||||||
A.object
|
A.object $
|
||||||
[ "type" A..= ("Note" :: String)
|
[ "type" A..= ("Note" :: String)
|
||||||
, "id" A..= note.noteId
|
, "id" A..= note.noteId
|
||||||
, "published" A..= note.notePublished
|
, "published" A..= note.notePublished
|
||||||
, "attributedTo" A..= note.noteActor
|
, "attributedTo" A..= note.noteActor
|
||||||
, "content" A..= note.noteContent
|
, "content" A..= note.noteContent
|
||||||
|
, "name" A..= note.noteName
|
||||||
|
, "replies" A..= note.noteReplies
|
||||||
]
|
]
|
||||||
|
<> [ "name" A..= name | Just name <- [note.noteName] ]
|
||||||
|
<> [ "url" A..= url | Just url <- [note.noteUrl] ]
|
||||||
|
|
||||||
instance A.ToJSON Object where
|
instance A.ToJSON Object where
|
||||||
toJSON = \case
|
toJSON = \case
|
||||||
|
|
Loading…
Add table
Reference in a new issue