hook.io-sdk
hook.io-sdk copied to clipboard
client.hook.update() unable to update entire hook object
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.
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.
Would be good to add tests for hook updating here: https://github.com/bigcompany/hook.io-test/tree/master/tests/client