ohif-viewer/Packages/ohif-servers/both/lib/getCurrentServer.js
2017-06-16 16:36:34 -03:00

18 lines
459 B
JavaScript

import { OHIF } from 'meteor/ohif:core';
import { Servers, CurrentServer } from 'meteor/ohif:servers/both/collections';
/**
* Retrieves the current server configuration used to retrieve studies
*/
OHIF.servers.getCurrentServer = () => {
const currentServer = CurrentServer.findOne();
if (!currentServer) {
return;
}
const serverConfiguration = Servers.findOne({ _id: currentServer.serverId });
return serverConfiguration;
};