-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PUT /apis Error: Meteor.userId can only be invoked in method calls or publications #3151
Comments
Before PR #3093 the functionality was OK. |
@marla-singer Sorry, I had wrong error list here. So I think this is not related to #3139. |
@matleppa Can't agree with you. Based on error trace the 4 line shows the field with error My hypothesis is that it has started working incorrectly after PR #3099 and changing collection schema platform/apinf_packages/apis/collection/schema.js Lines 98 to 108 in 4763ed0
|
@matleppa Also please check if a filed "created_by" contains the correct value if API is added via REST API. I have feeling It will not work as expected |
@marla-singer You are right, the created_by field is no updated, when an API card is created by Catalog API. It seems, that at least following corrections should be made: Catalog API
Apis schema
|
Please make the same thing for |
Description
Method PUT fails
Environment
Postman testing
Catalog API, method PUT
Result in localhost
Note! Replaced previous erroneous (unrelated, copy-paste error by me) errors with correct one
Error: Meteor.userId can only be invoked in method calls or publications.
at AccountsServer.userId (packages/accounts-base/accounts_server.js:79:13)
at Object.Meteor.userId (packages/accounts-base/accounts_common.js:263:19)
at Object.Apis.schema.SimpleSchema.updated_by.autoValue (apinf_packages/apis/collection/schema.js:104:27)
at Object.runAV (packages\aldeed_simple-schema.js:1282:26)
at packages\aldeed_simple-schema.js:1383:13
at Array.forEach (native)
at Function..each..forEach (packages\underscore.js:139:11)
at packages\aldeed_simple-schema.js:1382:7
at Function..each..forEach (packages\underscore.js:147:22)
at [object Object].getAutoValues (packages\aldeed_simple-schema.js:1345:5)
at [object Object].SimpleSchema.clean (packages\aldeed_simple-schema.js:1763:42)
at doClean (packages\aldeed_collection2-core.js:350:12)
at [object Object].doValidate (packages\aldeed_collection2-core.js:372:3)
at [object Object].Mongo.Collection.(anonymous function) [as update] (packages\aldeed_collection2-core.js:214:25)
at Object.CatalogV1.addCollection.endpoints.put.action (apinf_packages/apis/server/api.js:668:14)
at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:149:25)
at packages/nimble_restivus/lib/route.coffee:59:33
at packages\simple_json-routes.js:98:9
Result in nightly
500 Internal Server Error
Testing with Swagger
The text was updated successfully, but these errors were encountered: