status-go/protocol/requests/delete_community_category.go
RichΛrd 92032c7158
Community categories (#2228)
* create and edit community categories
* edit categories order
* adding category to chat
* Adding categories to json
2021-05-23 09:34:17 -04:00

29 lines
699 B
Go

package requests
import (
"errors"
"github.com/status-im/status-go/eth-node/types"
)
var ErrDeleteCommunityCategoryInvalidCommunityID = errors.New("set-community-chat-category: invalid community id")
var ErrDeleteCommunityCategoryInvalidCategoryID = errors.New("set-community-chat-category: invalid category id")
type DeleteCommunityCategory struct {
CommunityID types.HexBytes `json:"communityId"`
CategoryID string `json:"categoryId"`
}
func (j *DeleteCommunityCategory) Validate() error {
if len(j.CommunityID) == 0 {
return ErrDeleteCommunityCategoryInvalidCommunityID
}
if len(j.CategoryID) == 0 {
return ErrDeleteCommunityCategoryInvalidCategoryID
}
return nil
}