(ctx context.Context, db database.Store, userIDs []uuid.UUID)
| 377 | } |
| 378 | |
| 379 | func getAISeatSetByUserIDs(ctx context.Context, db database.Store, userIDs []uuid.UUID) (map[uuid.UUID]struct{}, error) { |
| 380 | aiSeatUserIDs, err := db.GetUserAISeatStates(ctx, userIDs) |
| 381 | if xerrors.Is(err, sql.ErrNoRows) { |
| 382 | err = nil |
| 383 | } |
| 384 | if err != nil { |
| 385 | return nil, err |
| 386 | } |
| 387 | |
| 388 | aiSeatSet := make(map[uuid.UUID]struct{}, len(aiSeatUserIDs)) |
| 389 | for _, uid := range aiSeatUserIDs { |
| 390 | aiSeatSet[uid] = struct{}{} |
| 391 | } |
| 392 | |
| 393 | return aiSeatSet, nil |
| 394 | } |
| 395 | |
| 396 | // @Summary Assign role to organization member |
| 397 | // @ID assign-role-to-organization-member |
no test coverage detected