Skip to content

Commit

Permalink
Update options.go (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
ostcar authored Sep 26, 2022
1 parent 5a0b685 commit 8c70c19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion createusers/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand Down
10 changes: 5 additions & 5 deletions createusers/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
}
Expand Down

0 comments on commit 8c70c19

Please sign in to comment.