I just found recently that Twitch had this mock api for testing requests without me needing to be a partner. While testing my integration, I found that I could not change Custom Rewards boolean field is_paused to false. I can set it to true, but not the inverse.
I may test it later, but from my quick view, this means that falsy f are ignored on update clause, right? Just as zero is ignored on integer clauses
Operating System
Windows WSL
Architecture Version (x86, x64, arm, etc)
x86
Steps to reproduce
Setup and start mock-api
Send an update (PATCH) request to /channel_points/custom_rewards changing the boolean field is_paused
When passing a true value, the request works and update the custom reward is_paused field. However, when we try to set this field as false, it does not happen. Here's a curl request:
What is the problem?
I just found recently that Twitch had this mock api for testing requests without me needing to be a partner. While testing my integration, I found that I could not change Custom Rewards boolean field
is_paused
tofalse
. I can set it totrue
, but not the inverse.I'm not familiarized with Golang, but tried to investigate the source code and found this code snippet, that may be related: https://github.com/twitchdev/twitch-cli/blob/main/internal/database/sql_gen.go#L192C8-L194
I may test it later, but from my quick view, this means that falsy
f
are ignored on update clause, right? Just as zero is ignored on integer clausesOperating System
Windows WSL
Architecture Version (x86, x64, arm, etc)
x86
Steps to reproduce
/channel_points/custom_rewards
changing the boolean fieldis_paused
When passing a
true
value, the request works and update the custom rewardis_paused
field. However, when we try to set this field asfalse
, it does not happen. Here's a curl request:There's no error log, it will just return me the payload containing a custom reward with
is_paused: true
Relevant log output
No response