| 26 | } |
| 27 | |
| 28 | func (i *imlServiceService) AppListByTeam(ctx context.Context, teamId ...string) ([]*Service, error) { |
| 29 | if len(teamId) == 0 { |
| 30 | return nil, fmt.Errorf("team id is empty") |
| 31 | } |
| 32 | w := map[string]interface{}{ |
| 33 | "team": teamId, |
| 34 | "as_app": true, |
| 35 | "is_delete": false, |
| 36 | } |
| 37 | list, err := i.store.List(ctx, w) |
| 38 | if err != nil { |
| 39 | return nil, err |
| 40 | } |
| 41 | return utils.SliceToSlice(list, FromEntity), nil |
| 42 | } |
| 43 | |
| 44 | func (i *imlServiceService) ForceDelete(ctx context.Context, id string) error { |
| 45 | _, err := i.store.DeleteWhere(ctx, map[string]interface{}{"uuid": id}) |