diff --git a/createusers/options.go b/createusers/options.go index 0858637..9e56afd 100644 --- a/createusers/options.go +++ b/createusers/options.go @@ -3,7 +3,7 @@ package createusers // Options is the meta information for the cli. type Options struct { Amount int `help:"Amount of user to be created." short:"n" default:"10"` - meetingID int `help:"If set, put the user in the delegated group of this meeting." short:"m"` + MeetingID int `help:"If set, put the user in the delegated group of this meeting." short:"m"` Batch int `help:"Number of users to create with one request. Default is all at once." short:"b"` } diff --git a/createusers/users.go b/createusers/users.go index 214ba31..92c5dd4 100644 --- a/createusers/users.go +++ b/createusers/users.go @@ -27,19 +27,19 @@ func (o Options) Run(ctx context.Context, cfg config.Config) error { namePrefix := "" extraFields := "" - if o.meetingID != 0 { - groupID, err := delegateGroup(ctx, c, o.meetingID) + if o.MeetingID != 0 { + groupID, err := delegateGroup(ctx, c, o.MeetingID) if err != nil { return fmt.Errorf("fetching delegated group: %w", err) } - namePrefix = fmt.Sprintf("m%d", o.meetingID) + namePrefix = fmt.Sprintf("m%d", o.MeetingID) extraFields = fmt.Sprintf(` "is_present_in_meeting_ids": [%d], "group_$_ids": {"%d":[%d]}, `, - o.meetingID, - o.meetingID, + o.MeetingID, + o.MeetingID, groupID, ) }