my $self = shift;
my $ou = $self->{ou};
- $self->{base_uri} = 'https://api.oneclickdigital.us/v1'; # TODO pull from org setting?
+ my $base_uri = 'https://api.oneclickdigital.com/v1';
+ $self->{base_uri} = OpenILS::Application::AppUtils->ou_ancestor_setting_value($ou, 'ebook_api.oneclickdigital.base_uri') || $base_uri;
my $library_id = OpenILS::Application::AppUtils->ou_ancestor_setting_value($ou, 'ebook_api.oneclickdigital.library_id');
if ($library_id) {
INSERT INTO config.org_unit_setting_type
(name, label, description, grp, datatype)
VALUES (
+ 'ebook_api.oneclickdigital.base_uri',
+ oils_i18n_gettext(
+ 'ebook_api.oneclickdigital.base_uri',
+ 'OneClickdigital Base URI',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'ebook_api.oneclickdigital.base_uri',
+ 'Base URI for OneClickdigital API (defaults to https://api.oneclickdigital.com/v1). Using HTTPS here is strongly encouraged.',
+ 'coust',
+ 'description'
+ ),
+ 'ebook_api',
+ 'string'
+),(
'ebook_api.oneclickdigital.library_id',
oils_i18n_gettext(
'ebook_api.oneclickdigital.library_id',
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXX', :eg_version);
+
+INSERT INTO config.org_unit_setting_type
+ (name, label, description, grp, datatype)
+VALUES (
+ 'ebook_api.oneclickdigital.base_uri',
+ oils_i18n_gettext(
+ 'ebook_api.oneclickdigital.base_uri',
+ 'OneClickdigital Base URI',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'ebook_api.oneclickdigital.base_uri',
+ 'Base URI for OneClickdigital API (defaults to https://api.oneclickdigital.com/v1). Using HTTPS here is strongly encouraged.',
+ 'coust',
+ 'description'
+ ),
+ 'ebook_api',
+ 'string'
+);
+
+COMMIT;
+