Add service type for pusher

This commit is contained in:
LittleSheep 2024-10-24 22:40:14 +08:00
parent f51b22f0e8
commit 1b5b2c42e5
2 changed files with 4 additions and 1 deletions

View File

@ -66,6 +66,8 @@ func (v *ServiceRpcServer) AddService(ctx context.Context, info *proto.ServiceIn
if info.GetId() != clientId {
return nil, status.Errorf(codes.InvalidArgument, "client_id mismatch in metadata")
} else if len(clientId) == 0 {
return nil, status.Errorf(codes.InvalidArgument, "client_id must not be blank")
}
in := &ServiceInstance{

View File

@ -2,4 +2,5 @@ package nex
const (
ServiceTypeAuth = "id"
ServiceTypePusher = "pusher"
)