fix
This commit is contained in:
@ -2,7 +2,7 @@ import { createHmac, timingSafeEqual } from "node:crypto";
|
|||||||
import type { RequestHandler } from "@sveltejs/kit";
|
import type { RequestHandler } from "@sveltejs/kit";
|
||||||
import { HASH_SECRET } from "$env/static/private";
|
import { HASH_SECRET } from "$env/static/private";
|
||||||
import { twitchChallengeEvent, twitchFollowEvent } from "$lib/twitch";
|
import { twitchChallengeEvent, twitchFollowEvent } from "$lib/twitch";
|
||||||
import { client } from "$lib";
|
import { client, followerSubject } from "$lib";
|
||||||
const getHmacMessage = (request: Request, body: string): string => {
|
const getHmacMessage = (request: Request, body: string): string => {
|
||||||
return (
|
return (
|
||||||
request.headers.get(TWITCH_MESSAGE_ID)! +
|
request.headers.get(TWITCH_MESSAGE_ID)! +
|
||||||
@ -55,6 +55,7 @@ export const fallback: RequestHandler = async ({ request }) => {
|
|||||||
|
|
||||||
const { user_name } = event.data.event;
|
const { user_name } = event.data.event;
|
||||||
|
|
||||||
|
followerSubject.next(user_name);
|
||||||
client.setRave(10_000);
|
client.setRave(10_000);
|
||||||
|
|
||||||
console.log(`${user_name} has just subscribed`);
|
console.log(`${user_name} has just subscribed`);
|
||||||
|
Reference in New Issue
Block a user