OHIF-172: Make default values for requestOptions object
This commit is contained in:
1 parent
1ed39e0d78
commit
131d64854c
2 files changed
+26
-25
No files matched your search
@@ -4,6 +4,31 @@ import { OHIF } from 'meteor/ohif:core';
|
||||
import { Servers } from 'meteor/ohif:servers/both/collections';
|
||||
import { ServerConfiguration } from 'meteor/ohif:servers/both/schema/servers.js';
|
||||
|
||||
// Validate the servers configuration
|
||||
Meteor.startup(() => {
|
||||
// Save custom properties (if any)...
|
||||
// "Meteor.settings" and "Meteor.settings.public" are set by default...
|
||||
let custom = {
|
||||
private: Meteor.settings.custom,
|
||||
public: Meteor.settings.public.custom
|
||||
};
|
||||
|
||||
// ... and remove them to prevent clean up
|
||||
delete Meteor.settings.custom;
|
||||
delete Meteor.settings.public.custom;
|
||||
|
||||
ServerConfiguration.clean(Meteor.settings);
|
||||
|
||||
// TODO: Make the error messages more clear
|
||||
// Taking this out for now to prevent confusion.
|
||||
// check(Meteor.settings, ServerConfiguration);
|
||||
|
||||
Meteor.settings.custom = custom.private;
|
||||
Meteor.settings.public.custom = custom.public;
|
||||
|
||||
OHIF.log.info(JSON.stringify(Meteor.settings, null, 2));
|
||||
});
|
||||
|
||||
// Check the servers on meteor startup
|
||||
Meteor.startup(function() {
|
||||
OHIF.log.info('Updating servers information from JSON configuration');
|
||||
@@ -34,28 +59,3 @@ Meteor.startup(function() {
|
||||
|
||||
OHIF.servers.control.resetCurrentServer();
|
||||
});
|
||||
|
||||
// Validate the servers configuration
|
||||
Meteor.startup(() => {
|
||||
// Save custom properties (if any)...
|
||||
// "Meteor.settings" and "Meteor.settings.public" are set by default...
|
||||
let custom = {
|
||||
private: Meteor.settings.custom,
|
||||
public: Meteor.settings.public.custom
|
||||
};
|
||||
|
||||
// ... and remove them to prevent clean up
|
||||
delete Meteor.settings.custom;
|
||||
delete Meteor.settings.public.custom;
|
||||
|
||||
ServerConfiguration.clean(Meteor.settings);
|
||||
|
||||
// TODO: Make the error messages more clear
|
||||
// Taking this out for now to prevent confusion.
|
||||
// check(Meteor.settings, ServerConfiguration);
|
||||
|
||||
Meteor.settings.custom = custom.private;
|
||||
Meteor.settings.public.custom = custom.public;
|
||||
|
||||
OHIF.log.info(JSON.stringify(Meteor.settings, null, 2));
|
||||
});
|
||||
Reference in new issue
Block a user