How to check if method is called from webUI or mobile App

Hello!

I need to make changes to one important server side method, that is used both on webApp and mobile app, but it must behave slightly differently, based on where it is called. Is there any solution I can use, to determine, from where the method was called?

Thanks! :slight_smile:

Add a parameter in the method with something like:

{
  source: $Meteor.isCordova ? 'cordova' : 'web'
}
1 Like

Thanks for the answer @rjdavid! It helped! :slight_smile: