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

(-)a/Koha/REST/V1/Config/SFTP/Servers.pm (-7 / +6 lines)
Lines 29-35 use Try::Tiny qw( catch try ); Link Here
29
29
30
=head3 list
30
=head3 list
31
31
32
Controller method that handles listing Koha::SFTP::Server objects
32
Controller method that handles listing Koha::File::Transport objects
33
33
34
=cut
34
=cut
35
35
Lines 50-56 sub list { Link Here
50
50
51
=head3 get
51
=head3 get
52
52
53
Controller method that handles retrieving a single Koha::SFTP::Server object
53
Controller method that handles retrieving a single Koha::File::Transport object
54
54
55
=cut
55
=cut
56
56
Lines 74-80 sub get { Link Here
74
74
75
=head3 add
75
=head3 add
76
76
77
Controller method that handles adding a new Koha::SFTP::Server object
77
Controller method that handles adding a new Koha::File::Transport object
78
78
79
=cut
79
=cut
80
80
Lines 83-89 sub add { Link Here
83
83
84
    return try {
84
    return try {
85
85
86
        my $sftp_server = Koha::SFTP::Server->new_from_api( $c->req->json );
86
        my $sftp_server = Koha::File::Transport->new_from_api( $c->req->json );
87
        $sftp_server->store->discard_changes;
87
        $sftp_server->store->discard_changes;
88
88
89
        $c->res->headers->location( $c->req->url->to_string . '/' . $sftp_server->id );
89
        $c->res->headers->location( $c->req->url->to_string . '/' . $sftp_server->id );
Lines 109-115 sub add { Link Here
109
109
110
=head3 update
110
=head3 update
111
111
112
Controller method that handles updating a Koha::SFTP::Server object
112
Controller method that handles updating a Koha::File::Transport object
113
113
114
=cut
114
=cut
115
115
Lines 146-152 sub update { Link Here
146
146
147
=head3 delete
147
=head3 delete
148
148
149
Controller method that handles deleting a Koha::SFTP::Server object
149
Controller method that handles deleting a Koha::File::Transport object
150
150
151
=cut
151
=cut
152
152
153
- 

Return to bug 39190