You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
disableRemoteMethod does not work in boot script #1869
@jmimi I was trying to reproduce your issue, it seems like the method still shows up in the API explorer, but the call to the method itself does become 404 Not found for me. Is this also your case? Or your endpoint is still call-able.
@jmimi I'm trying to see if this could be a bug with the remote layer, so we can identify where the issue is coming from, and when I was trying to reproduce the call becomes 404 when I run
app.models.Foo.disableRemoteMethod("find",true);
But the method still appears in the explorer for me.
disableRemoteMethod does get called, and makes function uncallable, not unviewable,
But I'm sure disableRemoteMethod should be call in model definition
@bajtos would you know what the intented behavior is? should we grey out the method in API-explorer or to Hide it completely?
disableRemoteMethod does get called, and makes function uncallable, not unviewable
This is expected. We don't have a mechanism to notify loopback-component-explorer that a method was disabled.
A similar case is adding a new model after explorer was initialised. To address that, we modified loopback to emit an event when a new model is added to the app, and now there is a pending patch strongloop/loopback-component-explorer#141 to listen for that event in explorer.
I think we should do the same for remote methods.
@davidcheung I think the triage is done here and the issue can be labelled as "feature" + "Beginner friendly".
Activity
davidcheung commentedon Dec 9, 2015
@jmimi I was trying to reproduce your issue, it seems like the method still shows up in the API explorer, but the call to the method itself does become
404 Not foundfor me. Is this also your case? Or your endpoint is still call-able.jmimi commentedon Dec 14, 2015
@davidcheung I forgot what is exactly the case. But I'm sure
disableRemoteMethodshould be call in model definitiondavidcheung commentedon Dec 17, 2015
@jmimi I'm trying to see if this could be a bug with the
remote layer, so we can identify where the issue is coming from, and when I was trying to reproduce the call becomes 404 when I runBut the method still appears in the explorer for me.
disableRemoteMethoddoes get called, and makes functionuncallable, notunviewable,@bajtos would you know what the intented behavior is? should we grey out the method in
API-exploreror to Hide it completely?jmimi commentedon Dec 17, 2015
@davidcheung Why there is different behaviour between calling in
boot-scriptandmodel-definition?bajtos commentedon Dec 18, 2015
This is expected. We don't have a mechanism to notify loopback-component-explorer that a method was disabled.
A similar case is adding a new model after explorer was initialised. To address that, we modified loopback to emit an event when a new model is added to the app, and now there is a pending patch strongloop/loopback-component-explorer#141 to listen for that event in explorer.
I think we should do the same for remote methods.
@davidcheung I think the triage is done here and the issue can be labelled as "feature" + "Beginner friendly".
supasate commentedon Apr 27, 2016
I have submitted 2 PRs to solve this issue (#2266 and strongloop/loopback-component-explorer#157).
supasate commentedon Jul 12, 2016
@bajtos This issue was solved. You can close this issue.