forked from jagi/meteor-astronomy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set throwStubExceptions to true for the /Astronomy/execute method
- Loading branch information
1 parent
1a792f0
commit 9fbf8c2
Showing
5 changed files
with
83 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,73 @@ | ||
allow-deny@1.0.6 | ||
autoupdate@1.3.12 | ||
babel-compiler@6.20.0 | ||
babel-runtime@1.0.1 | ||
allow-deny@1.1.0 | ||
autoupdate@1.4.0 | ||
babel-compiler@7.0.4 | ||
babel-runtime@1.2.0 | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
boilerplate-generator@1.2.0 | ||
boilerplate-generator@1.4.0 | ||
[email protected] | ||
[email protected] | ||
callback-hook@1.0.10 | ||
check@1.2.5 | ||
callback-hook@1.1.0 | ||
check@1.3.0 | ||
[email protected] | ||
ddp@1.3.0 | ||
ddp-client@2.1.3 | ||
ddp-common@1.2.9 | ||
ddp-server@2.0.2 | ||
ddp@1.4.0 | ||
ddp-client@2.3.1 | ||
ddp-common@1.4.0 | ||
ddp-server@2.1.2 | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
http@1.2.12 | ||
id-map@1.0.9 | ||
http@1.4.0 | ||
id-map@1.1.0 | ||
[email protected] | ||
jagi:[email protected].1 | ||
jagi:[email protected].4 | ||
[email protected] | ||
local-test:jagi:[email protected].1 | ||
[email protected].17 | ||
local-test:jagi:[email protected].4 | ||
[email protected].19 | ||
mdg:[email protected] | ||
meteor@1.7.1 | ||
minimongo@1.3.1 | ||
modules@0.10.0 | ||
modules-runtime@0.8.0 | ||
mongo@1.2.0 | ||
mongo-dev-server@1.0.1 | ||
meteor@1.8.2 | ||
minimongo@1.4.3 | ||
modules@0.11.3 | ||
modules-runtime@0.9.1 | ||
mongo@1.4.2 | ||
mongo-dev-server@1.1.0 | ||
[email protected] | ||
[email protected].30 | ||
[email protected].33 | ||
[email protected] | ||
ordered-dict@1.0.9 | ||
ordered-dict@1.1.0 | ||
practicalmeteor:[email protected]_1 | ||
practicalmeteor:[email protected]_2 | ||
practicalmeteor:[email protected]_2 | ||
practicalmeteor:[email protected] | ||
practicalmeteor:[email protected]_2 | ||
promise@0.9.0 | ||
random@1.0.10 | ||
promise@0.10.1 | ||
random@1.1.0 | ||
[email protected] | ||
reload@1.1.11 | ||
retry@1.0.9 | ||
reload@1.2.0 | ||
retry@1.1.0 | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected]_1 | ||
[email protected] | ||
tinytest@1.0.12 | ||
tinytest@1.1.0 | ||
tmeasday:[email protected] | ||
[email protected] | ||
[email protected] | ||
url@1.1.0 | ||
webapp@1.3.19 | ||
url@1.2.0 | ||
webapp@1.5.0 | ||
[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
function callMeteorMethod( | ||
Class, methodName, methodArgs, callback | ||
) { | ||
const callMeteorMethod = (Class, methodName, methodArgs, callback) => { | ||
const Collection = Class.getCollection(); | ||
let connection = Collection && Collection._connection; | ||
if (!connection && (!Collection || !Collection._name)) { | ||
connection = Meteor.connection; | ||
connection = Meteor.connection || Meteor.server; | ||
} | ||
|
||
// Prepare meteor method options. | ||
const methodOptions = { | ||
throwStubExceptions: true, | ||
returnStubValue: true | ||
}; | ||
return connection.apply(methodName, methodArgs, methodOptions, callback); | ||
}; | ||
|
||
return connection.apply( | ||
methodName, methodArgs, methodOptions, callback | ||
); | ||
} | ||
|
||
export default callMeteorMethod; | ||
export default callMeteorMethod; |