mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 17:28:54 +00:00
417ef2c9b6
- Move team-related service methods to `ee/server/service`. - Instantiate different service on startup based on license key. - Refactor service errors into separate package. - Add support for running E2E tests in both Core and Basic tiers.
19 lines
433 B
Go
19 lines
433 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/fleetdm/fleet/server/kolide"
|
|
)
|
|
|
|
func (mw validationMiddleware) InviteNewUser(ctx context.Context, payload kolide.InvitePayload) (*kolide.Invite, error) {
|
|
invalid := &kolide.InvalidArgumentError{}
|
|
if payload.Email == nil {
|
|
invalid.Append("email", "missing required argument")
|
|
}
|
|
if invalid.HasErrors() {
|
|
return nil, invalid
|
|
}
|
|
return mw.Service.InviteNewUser(ctx, payload)
|
|
}
|