rapidjs/rapid.js

save, update not work.

Opened this issue · 0 comments

export default new Base({
  routes: {
    model: 'data/account/user',
    collection: 'data/account/user'
  },
  suffixes: {
    create: '',
    update: '',
    destroy: ''
  },
  methods: {
    update: 'put',
    destroy: 'delete'
  }
});

Not work

await Phone.update(phone.id, phone);
await Phone.save(phone.id, phone);

Work

await Phone
.id(phone.id)
.withParams(phone)
.put();