2021-05-18 19:32:15 +00:00
|
|
|
package requests
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
|
|
|
|
"github.com/status-im/status-go/eth-node/types"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2022-05-24 19:20:13 +00:00
|
|
|
ErrEditCommunityInvalidID = errors.New("edit-community: invalid id")
|
2021-05-18 19:32:15 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type EditCommunity struct {
|
|
|
|
CommunityID types.HexBytes
|
|
|
|
CreateCommunity
|
|
|
|
}
|
|
|
|
|
|
|
|
func (u *EditCommunity) Validate() error {
|
|
|
|
if len(u.CommunityID) == 0 {
|
|
|
|
return ErrEditCommunityInvalidID
|
|
|
|
}
|
|
|
|
|
2022-05-24 19:20:13 +00:00
|
|
|
return u.CreateCommunity.Validate()
|
2021-05-18 19:32:15 +00:00
|
|
|
}
|