From a5d475946bb7da3b44e114ec8b97d2a9330712c6 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Mon, 21 Mar 2022 21:13:20 +0000 Subject: [PATCH] Completely change how the goals webhook works --- common/package.json | 2 +- common/src/webhooks.ts | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/common/package.json b/common/package.json index 5d0f0fd88..5ac4c5b91 100644 --- a/common/package.json +++ b/common/package.json @@ -1,6 +1,6 @@ { "name": "tachi-common", - "version": "0.6.12", + "version": "0.7.0", "description": "Common Types & Utilities for Tachi", "main": "js/index.js", "files": [ diff --git a/common/src/webhooks.ts b/common/src/webhooks.ts index a93d64d76..7ec2247fa 100644 --- a/common/src/webhooks.ts +++ b/common/src/webhooks.ts @@ -21,14 +21,16 @@ export interface WebhookEventClassUpdateV1 { * An event fired when a goal is achieved. */ export interface WebhookEventGoalAchievedV1 { - type: "goal-achieved/v1"; + type: "goals-achieved/v1"; content: { userID: integer; - goalID: string; - old: GoalImportStat; - new: GoalImportStat; - game: Game; - playtype: Playtypes[Game]; + goals: { + goalID: string; + old: GoalImportStat; + new: GoalImportStat; + game: Game; + playtype: Playtypes[Game]; + }[]; }; }