Fixing serverId issues

This commit is contained in:
Bruno Alves de Faria committed 2017-06-16 16:36:34 -03:00
1 parent 95533c785b
commit b4bb44625c
62 files changed
+685 -556

No files matched your search

@@ -0,0 +1,17 @@
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;
};