Skip to content

Commit e7c0f2e

Browse files
committed
update grantExpression
1 parent 6293ee3 commit e7c0f2e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

server/controllers/droppedAssets/handleQuestItemClicked.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,12 @@ export const handleQuestItemClicked = async (req: Request, res: Response) => {
202202
analytics.push({ analyticName: `itemsCollected${totalCollected}`, profileId, uniqueKey: profileId });
203203

204204
const name = process.env.EMOTE_NAME || "quest_1";
205-
// @ts-ignore
206-
const awardExpressionResult = await visitor.awardExpression({ name });
205+
const grantExpressionResult = await visitor.grantExpression({ name });
207206

208207
let title = "🔎 New Emote Unlocked",
209208
text = "Congrats! Your detective skills paid off.";
210209
// @ts-ignore
211-
if (awardExpressionResult.data?.statusCode === 200 || awardExpressionResult.status === 200) {
210+
if (grantExpressionResult.data?.statusCode === 200 || grantExpressionResult.status === 200) {
212211
promises.push(
213212
visitor.triggerParticle({ name: "firework2_gold" }).catch((error: AxiosError) =>
214213
errorHandler({
@@ -221,7 +220,7 @@ export const handleQuestItemClicked = async (req: Request, res: Response) => {
221220

222221
analytics.push({ analyticName: `${name}-emoteUnlocked`, urlSlug, uniqueKey: urlSlug });
223222
// @ts-ignore
224-
} else if (awardExpressionResult.data?.statusCode === 409 || awardExpressionResult.status === 409) {
223+
} else if (grantExpressionResult.data?.statusCode === 409 || grantExpressionResult.status === 409) {
225224
title = `Congrats! You collected ${totalCollected} quest items`;
226225
text = "Keep up the solid detective work 🔎";
227226
}

0 commit comments

Comments
 (0)