hook.io-sdk icon indicating copy to clipboard operation
hook.io-sdk copied to clipboard

client.hook.update() unable to update entire hook object

Open andrewtlove opened this issue 8 years ago • 2 comments

I've noticed that the update() method only updates some fields. For example, the customTimeout parameter can only be set at hook creation, but not later modified through client.hook.update().

In another instance, a parameter may only be modified in a particular way. For example, one is permitted to modify the parameters isPublic from false --> true, but not from true --> false. The opposite is true for isPrivate.

Perhaps there's a good reason for this, but I've not been able to decipher why this is occurring just yet.

andrewtlove avatar Aug 26 '16 03:08 andrewtlove

The entry-point for update is /view/admin.js, new hooks is /view/new.js

I've been updating admin.js file recently and will check out the problem with boolean type updates / missing properties.

Marak avatar Aug 26 '16 03:08 Marak

Would be good to add tests for hook updating here: https://github.com/bigcompany/hook.io-test/tree/master/tests/client

Marak avatar Aug 26 '16 03:08 Marak