fix(client-only): Fix client-only Server & CurrentServer usage (#276)
This commit is contained in:
1 parent
c4b1086097
commit
18a3bcba30
10 files changed
+86
-37
No files matched your search
@@ -2,7 +2,12 @@ import { Mongo } from 'meteor/mongo';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
// CurrentServer is a single document collection to describe which of the Servers is being used
|
||||
const CurrentServer = new Mongo.Collection('currentServer');
|
||||
let collectionName = 'currentServer';
|
||||
if (Meteor.settings && Meteor.settings.public && Meteor.settings.public.clientOnly === true) {
|
||||
collectionName = null;
|
||||
}
|
||||
|
||||
const CurrentServer = new Mongo.Collection(collectionName);
|
||||
CurrentServer._debugName = 'CurrentServer';
|
||||
OHIF.servers.collections.currentServer = CurrentServer;
|
||||
|
||||
|
||||
@@ -2,8 +2,13 @@ import { Mongo } from 'meteor/mongo';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
// import { Servers as ServerSchema } from 'meteor/ohif:servers/both/schema/servers.js';
|
||||
|
||||
let collectionName = 'servers';
|
||||
if (Meteor.settings && Meteor.settings.public && Meteor.settings.public.clientOnly === true) {
|
||||
collectionName = null;
|
||||
}
|
||||
|
||||
// Servers describe the DICOM servers configurations
|
||||
const Servers = new Mongo.Collection('servers');
|
||||
const Servers = new Mongo.Collection(collectionName);
|
||||
// TODO: Make the Schema match what we are currently sticking into the Collection
|
||||
//Servers.attachSchema(ServerSchema);
|
||||
Servers._debugName = 'Servers';
|
||||
|
||||
Reference in new issue
Block a user