init push
This commit is contained in:
26
internal/transport/http/dto/delete_dto.go
Normal file
26
internal/transport/http/dto/delete_dto.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package dto
|
||||
|
||||
// GenericDeleteResponse is a common success payload for DELETE endpoints.
|
||||
type GenericDeleteResponse struct {
|
||||
Data GenericDeleteResponseData `json:"data"`
|
||||
}
|
||||
|
||||
type GenericDeleteResponseData struct {
|
||||
Type string `json:"type" example:"delete_result"`
|
||||
Attributes GenericDeleteAttributes `json:"attributes"`
|
||||
}
|
||||
|
||||
type GenericDeleteAttributes struct {
|
||||
Deleted bool `json:"deleted" example:"true"`
|
||||
}
|
||||
|
||||
func NewGenericDeleteResponse(resourceType string) GenericDeleteResponse {
|
||||
return GenericDeleteResponse{
|
||||
Data: GenericDeleteResponseData{
|
||||
Type: resourceType,
|
||||
Attributes: GenericDeleteAttributes{
|
||||
Deleted: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user