Skip to content

Commit

Permalink
Kick category required. (#5298)
Browse files Browse the repository at this point in the history
  • Loading branch information
michelinewu authored Feb 6, 2025
1 parent 87c88e9 commit 9bd1a1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/components-react/windows/go-live/GameSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default function GameSelector(p: TProps) {
}}
filterOption={filterOption}
debounce={500}
required={isTwitch || isTrovo}
required={isTwitch || isTrovo || isKick}
hasImage={isTwitch || isTrovo || isKick}
onBeforeSearch={onBeforeSearchHandler}
imageSize={platformService.gameImageSize}
Expand Down
10 changes: 4 additions & 6 deletions app/services/platforms/kick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,8 @@ export class KickService
const body = new FormData();
body.append('title', opts.title);

if (opts.game !== '') {
body.append('category', opts.game);
}
const game = opts.game === '' ? '15' : opts.game;
body.append('category', game);

const request = new Request(url, { headers, method: 'POST', body });

Expand Down Expand Up @@ -325,6 +324,7 @@ export class KickService
return jfetch<IKickStreamInfoResponse>(request)
.then(async res => {
const data = res as IKickStreamInfoResponse;
console.log('data', JSON.stringify(data, null, 2));

if (data.categories && data.categories.length > 0) {
const games = await Promise.all(
Expand Down Expand Up @@ -376,9 +376,7 @@ export class KickService

const params = new URLSearchParams();
params.append('title', settings.title);
if (settings.game !== '') {
params.append('category', settings.game);
}
params.append('category', settings.game);

const request = new Request(url, { headers, method: 'PUT', body: params.toString() });

Expand Down

0 comments on commit 9bd1a1a

Please sign in to comment.