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

(-)a/Koha/REST/V1/Patrons/Account.pm (-1 / +6 lines)
Lines 142-148 sub add_credit { Link Here
142
            $credit->apply({ debits => [ $outstanding_debits->as_list ], offset_type => 'payment' });
142
            $credit->apply({ debits => [ $outstanding_debits->as_list ], offset_type => 'payment' });
143
        }
143
        }
144
144
145
        return $c->render( status => 200, openapi => { account_line_id => $credit->id } );
145
        $credit->discard_changes;
146
147
        return $c->render(
148
            status  => 201,
149
            openapi => $credit->to_api
150
        );
146
    }
151
    }
147
    catch {
152
    catch {
148
        $c->unhandled_exception($_);
153
        $c->unhandled_exception($_);
(-)a/api/v1/swagger/paths/patrons_account.json (-2 / +1 lines)
Lines 85-91 Link Here
85
        "application/json"
85
        "application/json"
86
      ],
86
      ],
87
      "responses": {
87
      "responses": {
88
        "200": {
88
        "201": {
89
          "description": "Credit added",
89
          "description": "Credit added",
90
          "schema": {
90
          "schema": {
91
            "type": "object"
91
            "type": "object"
92
- 

Return to bug 28424