2022-12-10 17:17:16 +00:00
|
|
|
package types
|
|
|
|
|
2023-09-25 16:55:08 +00:00
|
|
|
// EmptyResponse is a response without any fields.
|
|
|
|
// It embeds LemmyResponse to capture any errors.
|
2023-09-25 02:28:46 +00:00
|
|
|
type EmptyResponse struct {
|
|
|
|
LemmyResponse
|
|
|
|
}
|
|
|
|
|
2023-09-25 16:55:08 +00:00
|
|
|
// EmptyData is a request without any fields. It contains
|
|
|
|
// an Auth field so that the auth token is sent to the server.
|
2023-09-25 04:48:00 +00:00
|
|
|
type EmptyData struct {
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
|
|
|
}
|
|
|
|
|
2023-09-25 16:55:08 +00:00
|
|
|
// LemmyResponse is embedded in all response structs
|
|
|
|
// to capture any errors sent by the Lemmy server.
|
2022-12-10 17:17:16 +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
|
|
|
}
|