lincolnloop / amygdala

RESTful HTTP client for JavaScript powered web applications
BSD 3-Clause "New" or "Revised" License
393 stars 22 forks source link

update() does not use apiUrl and schema url #19

Open johndevs opened 8 years ago

johndevs commented 8 years ago

I have the fallowing instance configured:

this.store = new Amygdala({
      'config' : {
        'apiUrl' : 'http://localhost:8081',
        'idAttribute': 'url',
      },
      'schema' : {
        'plans' : {
          'url' : '/plans/'
        }
      }
    });

this.store.get('plans', {'url': 'myid'}) resolves correctly to http://localhost:8081/plans/myid

but

this.store.update('plans', {'url':'myid', data:data}) resolves to http://localhost:8080/myid

The webserver serving the app is running on http://localhost:8080 while a I have the REST API on http://localhost:8081