New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding channels via the admin API fails. #134
Comments
With #135 merged the duplication issue is gone. The endpoint only accepts userids. Not sure what your request was like but looks to be working correctly to me.
|
fix duplication of userids on config when added via api #134
I think i sent the userIDs as numbers instead of strings so that could be the issue. But if you send it a username instead of a id it happily accepts it and appends the name into the config aswell. That sounds like unexpected behaviour to me. for example if you give it "forsen" instead of "22484632" |
Yeah I mean in theory that could be a valid userid since twitch specifically said userids are strings. I could make a helix call but it makes it more complicated |
Also this gives you the option to add banned users which might get unbanned in the future, so I'd rather keep it simple and expect the caller to be smart with what it submits to the API |
I added some sanity checks on my side, so this should be okay for now. 👍 |
When using the POST endpoint to add a channel to justlog, it gives me a response that the given channel was successfully joined, but the config gets appended with the target username instead of the userid, and this can be also repeated to keep appending the same name to the config file over and over again.
My guess is that the expected behaviour is to convert the given name to a ID and then append it to the config after checking it isn't already in the list of channel IDs.
When feeding a userID to the endpoint, i receive a 400 with the following error:
ANYWAYS: json: cannot unmarshal object into Go struct field channelConfigsJoinRequest.channels of type string
The text was updated successfully, but these errors were encountered: