Bugzilla – Attachment 177343 Details for
Bug 38993
Merge fetch files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38993: Restore add patrons to list
Bug-38993-Restore-add-patrons-to-list.patch (text/plain), 1.91 KB, created by
Jonathan Druart
on 2025-01-30 09:06:31 UTC
(
hide
)
Description:
Bug 38993: Restore add patrons to list
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-01-30 09:06:31 UTC
Size:
1.91 KB
patch
obsolete
>From 12b7cb94c2f22af1db045203267b58a8ffa48bed Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 30 Jan 2025 10:06:18 +0100 >Subject: [PATCH] Bug 38993: Restore add patrons to list > >--- > .../prog/js/fetch/patron-api-client.js | 24 +++++++++++++++++-- > 1 file changed, 22 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/fetch/patron-api-client.js b/koha-tmpl/intranet-tmpl/prog/js/fetch/patron-api-client.js >index 835952242b3..666aa639d27 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/fetch/patron-api-client.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/fetch/patron-api-client.js >@@ -1,7 +1,7 @@ > export class PatronAPIClient { > constructor(HttpClient) { > this.httpClient = new HttpClient({ >- baseURL: "/api/v1/", >+ baseURL: "", > }); > } > >@@ -9,10 +9,30 @@ export class PatronAPIClient { > return { > get: id => > this.httpClient.get({ >- endpoint: "patrons/" + id, >+ endpoint: "/api/v1/patrons/" + id, > }), > }; > } >+ >+ get lists() { >+ return { >+ add_patrons: ({ patron_ids, list_id, new_list_name }) => >+ this.httpClient.post({ >+ endpoint: "/cgi-bin/koha/svc/members/add_to_list", >+ body: "add_to_patron_list=%s&new_patron_list=%s&%s".format( >+ list_id, >+ new_list_name, >+ patron_ids >+ .map(id => "borrowernumber=%s".format(id)) >+ .join("&") >+ ), >+ headers: { >+ "Content-Type": >+ "application/x-www-form-urlencoded;charset=utf-8", >+ }, >+ }), >+ }; >+ } > } > > export default PatronAPIClient; >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38993
:
177316
|
177317
|
177318
|
177337
|
177338
|
177339
|
177342
|
177343
|
177344
|
177345
|
177346
|
177347
|
177348
|
179100
|
179101
|
179102
|
179103
|
179106
|
179107
|
179108
|
179109
|
179513
|
179550