| 510 | } |
| 511 | |
| 512 | func (i *imlServiceModule) Simple(ctx context.Context) ([]*service_dto.SimpleServiceItem, error) { |
| 513 | w := make(map[string]interface{}) |
| 514 | w["as_server"] = true |
| 515 | |
| 516 | services, err := i.serviceService.Search(ctx, "", w) |
| 517 | if err != nil { |
| 518 | return nil, err |
| 519 | } |
| 520 | |
| 521 | items := make([]*service_dto.SimpleServiceItem, 0, len(services)) |
| 522 | for _, p := range services { |
| 523 | items = append(items, &service_dto.SimpleServiceItem{ |
| 524 | Id: p.Id, |
| 525 | Name: p.Name, |
| 526 | Description: p.Description, |
| 527 | Team: auto.UUID(p.Team), |
| 528 | }) |
| 529 | } |
| 530 | return items, nil |
| 531 | } |
| 532 | |
| 533 | func (i *imlServiceModule) MySimple(ctx context.Context) ([]*service_dto.SimpleServiceItem, error) { |
| 534 | services, err := i.searchMyServices(ctx, "", "") |