24 lines
442 B
Go
24 lines
442 B
Go
|
package requests
|
||
|
|
||
|
import (
|
||
|
"errors"
|
||
|
|
||
|
"github.com/status-im/status-go/eth-node/types"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
ErrCheckPermissionToJoinCommunityInvalidID = errors.New("check-permission-to-join-community: invalid id")
|
||
|
)
|
||
|
|
||
|
type CheckPermissionToJoinCommunity struct {
|
||
|
CommunityID types.HexBytes
|
||
|
}
|
||
|
|
||
|
func (u *CheckPermissionToJoinCommunity) Validate() error {
|
||
|
if len(u.CommunityID) == 0 {
|
||
|
return ErrCheckPermissionToJoinCommunityInvalidID
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|