View | Details | Raw Unified | Return to bug 18409
Collapse All | Expand All

(-)a/Koha/REST/V1/Hold.pm (-3 / +4 lines)
Lines 34-40 sub list { Link Here
34
    foreach my $key (keys %$params) {
34
    foreach my $key (keys %$params) {
35
        delete $params->{$key} unless grep { $key eq $_ } @valid_params;
35
        delete $params->{$key} unless grep { $key eq $_ } @valid_params;
36
    }
36
    }
37
    my $holds = Koha::Holds->search($params)->unblessed;
37
    my $holds = Koha::Holds->search($params);
38
38
39
    return $c->$cb($holds, 200);
39
    return $c->$cb($holds, 200);
40
}
40
}
Lines 106-112 sub add { Link Here
106
        }, 500);
106
        }, 500);
107
    }
107
    }
108
108
109
    my $reserve = C4::Reserves::GetReserve($reserve_id);
109
    my $reserve = Koha::Holds->find($reserve_id);
110
110
111
    return $c->$cb($reserve, 201);
111
    return $c->$cb($reserve, 201);
112
}
112
}
Lines 137-144 sub edit { Link Here
137
        rank => $priority,
137
        rank => $priority,
138
        suspend_until => $suspend_until,
138
        suspend_until => $suspend_until,
139
    };
139
    };
140
140
    C4::Reserves::ModReserve($params);
141
    C4::Reserves::ModReserve($params);
141
    $reserve = C4::Reserves::GetReserve($reserve_id);
142
    $reserve = Koha::Holds->find($reserve_id);
142
143
143
    return $c->$cb($reserve, 200);
144
    return $c->$cb($reserve, 200);
144
}
145
}
(-)a/Koha/Schema/Result/Reserve.pm (+5 lines)
Lines 334-337 __PACKAGE__->belongs_to( Link Here
334
  },
334
  },
335
);
335
);
336
336
337
__PACKAGE__->add_columns(
338
    '+lowestPriority' => { is_boolean => 1 },
339
    '+suspend' => { is_boolean => 1 }
340
);
341
337
1;
342
1;
(-)a/api/v1/swagger/definitions/hold.json (-4 / +3 lines)
Lines 59-73 Link Here
59
    },
59
    },
60
    "lowestPriority": {
60
    "lowestPriority": {
61
      "type": "boolean",
61
      "type": "boolean",
62
      "description": ""
62
      "description": "Controls if the hold is given the lowest priority on the queue"
63
    },
63
    },
64
    "suspend": {
64
    "suspend": {
65
      "type": "boolean",
65
      "type": "boolean",
66
      "description": ""
66
      "description": "Controls if the hold is suspended"
67
    },
67
    },
68
    "suspend_until": {
68
    "suspend_until": {
69
      "type": ["string", "null"],
69
      "type": ["string", "null"],
70
      "description": ""
70
      "description": "Date until which the hold has been suspended"
71
    },
71
    },
72
    "itemtype": {
72
    "itemtype": {
73
      "type": ["string", "null"],
73
      "type": ["string", "null"],
74
- 

Return to bug 18409