2023-10-04 23:23:31 +00:00
|
|
|
package lemmy
|
2022-12-10 17:17:16 +00:00
|
|
|
|
2023-10-04 23:28:52 +00:00
|
|
|
// emptyResponse is a response without any fields.
|
2023-09-25 16:55:08 +00:00
|
|
|
// It embeds LemmyResponse to capture any errors.
|
2023-10-04 23:28:52 +00:00
|
|
|
type emptyResponse struct {
|
|
|
|
lemmyResponse
|
2023-09-25 02:28:46 +00:00
|
|
|
}
|
|
|
|
|
2023-10-04 23:28:52 +00:00
|
|
|
// lemmyResponse is embedded in all response structs
|
2023-09-25 16:55:08 +00:00
|
|
|
// to capture any errors sent by the Lemmy server.
|
2023-10-04 23:28:52 +00:00
|
|
|
type lemmyResponse struct {
|
2022-12-10 23:33:08 +00:00
|
|
|
Error Optional[string] `json:"error" url:"error,omitempty"`
|
2022-12-10 17:17:16 +00:00
|
|
|
}
|