mirror of
https://github.com/vale981/grapher
synced 2025-03-05 17:41:41 -05:00
coding standards...
This commit is contained in:
parent
2b65928a07
commit
998a3a7023
2 changed files with 3 additions and 2 deletions
|
@ -23,7 +23,7 @@ export default (...args) => {
|
|||
|
||||
const collection = Mongo.Collection.get(entryPointName);
|
||||
if (!collection) {
|
||||
if(name){ //is a NamedQuery
|
||||
if (name) { //is a NamedQuery
|
||||
throw new Meteor.Error('invalid-name', `We could not find any collection with the name "${entryPointName}". Make sure it is imported prior to using this`)
|
||||
}
|
||||
const namedQuery = NamedQueryStore.get(entryPointName);
|
||||
|
@ -38,6 +38,7 @@ export default (...args) => {
|
|||
if (name) {
|
||||
const query = new NamedQuery(name, collection, body[entryPointName], ...rest);
|
||||
NamedQueryStore.add(name, query);
|
||||
|
||||
return query;
|
||||
} else {
|
||||
return new Query(collection, body[entryPointName], ...rest);
|
||||
|
|
|
@ -9,8 +9,8 @@ _.extend(Mongo.Collection.prototype, {
|
|||
|
||||
const query = new NamedQuery(name, this, body, params);
|
||||
NamedQueryStore.add(name, query);
|
||||
|
||||
return query;
|
||||
|
||||
} else { //Query
|
||||
const body = args[0];
|
||||
const params = args[1];
|
||||
|
|
Loading…
Add table
Reference in a new issue