@@ -28,9 +28,6 @@ type SearchOptions struct {
2828 // Omit specifies a list of service IDs to exclude from the results.
2929 Omit []string `json:"m,omitempty"`
3030
31- // Only lookup the service IDs present in the request.
32- Only []string `json:"only,omitempty"`
33-
3431 // FavoritesFirst indicates that services marked as favorite (by FavoritesUserID) should be returned first (before any non-favorites).
3532 FavoritesFirst bool `json:"f,omitempty"`
3633
@@ -209,28 +206,6 @@ func (s *Store) Search(ctx context.Context, opts *SearchOptions) ([]Service, err
209206 opts = & SearchOptions {}
210207 }
211208
212- if len (opts .Only ) > 0 {
213- query := `SELECT id, name, description, escalation_policy_id, false, maintenance_expires_at
214- FROM services WHERE id = ANY($1::uuid[])`
215- rows , err := s .db .QueryContext (ctx , query , sqlutil .UUIDArray (opts .Only ))
216- if err != nil {
217- return nil , err
218- }
219- defer rows .Close ()
220- var result []Service
221- for rows .Next () {
222- var s Service
223- var maintExpiresAt sql.NullTime
224- err = rows .Scan (& s .ID , & s .Name , & s .Description , & s .EscalationPolicyID , & s .isUserFavorite , & maintExpiresAt )
225- if err != nil {
226- return nil , err
227- }
228- s .MaintenanceExpiresAt = maintExpiresAt .Time
229- result = append (result , s )
230- }
231- return result , nil
232- }
233-
234209 userCheck := permission .User
235210 if opts .FavoritesUserID != "" {
236211 userCheck = permission .MatchUser (opts .FavoritesUserID )
0 commit comments