forked from AkkomaGang/akkoma
Chats: Add updated_at to Schema and docs.
This commit is contained in:
parent
3342846ac2
commit
1d18721a3c
2 changed files with 10 additions and 5 deletions
|
@ -68,7 +68,8 @@ Returned data:
|
|||
},
|
||||
"id" : "1",
|
||||
"unread" : 2,
|
||||
"last_message" : {...} // The last message in that chat
|
||||
"last_message" : {...}, // The last message in that chat
|
||||
"updated_at": "2020-04-21T15:11:46.000Z"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -88,7 +89,8 @@ Returned data:
|
|||
...
|
||||
},
|
||||
"id" : "1",
|
||||
"unread" : 0
|
||||
"unread" : 0,
|
||||
"updated_at": "2020-04-21T15:11:46.000Z"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -112,7 +114,8 @@ Returned data:
|
|||
},
|
||||
"id" : "1",
|
||||
"unread" : 2,
|
||||
"last_message" : {...} // The last message in that chat
|
||||
"last_message" : {...}, // The last message in that chat
|
||||
"updated_at": "2020-04-21T15:11:46.000Z"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
|
|
@ -16,7 +16,8 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Chat do
|
|||
id: %Schema{type: :string},
|
||||
account: %Schema{type: :object},
|
||||
unread: %Schema{type: :integer},
|
||||
last_message: ChatMessage
|
||||
last_message: ChatMessage,
|
||||
updated_at: %Schema{type: :string, format: :"date-time"}
|
||||
},
|
||||
example: %{
|
||||
"account" => %{
|
||||
|
@ -67,7 +68,8 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Chat do
|
|||
},
|
||||
"id" => "1",
|
||||
"unread" => 2,
|
||||
"last_message" => ChatMessage.schema().example()
|
||||
"last_message" => ChatMessage.schema().example(),
|
||||
"updated_at" => "2020-04-21T15:06:45.000Z"
|
||||
}
|
||||
})
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue