From da8aaabe07ef5cd59155cf676e52b3a779c647a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ian=20P=C3=B6sse-Koch?= Date: Tue, 3 Dec 2024 22:24:59 +0100 Subject: [PATCH] add expiring share links to url recipe actions --- frontend/composables/use-group-recipe-actions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/composables/use-group-recipe-actions.ts b/frontend/composables/use-group-recipe-actions.ts index d2b37a803..f5cffc011 100644 --- a/frontend/composables/use-group-recipe-actions.ts +++ b/frontend/composables/use-group-recipe-actions.ts @@ -50,13 +50,13 @@ export const useGroupRecipeActions = function ( } async function parseRecipeActionUrl(url: string, recipe: Recipe, recipeScale: number): Promise { - const recipeServings = (recipe.recipeServings || 1) * recipeScale; - const recipeYieldQuantity = (recipe.recipeYieldQuantity || 1) * recipeScale; - /* eslint-disable no-template-curly-in-string */ const shareLinkRegex = /\$\{share-link-expires-seconds-[0-9]+\}/g; const group = (await api.groups.getOne(recipe.groupId || "")).data; + const recipeServings = (recipe.recipeServings || 1) * recipeScale; + const recipeYieldQuantity = (recipe.recipeYieldQuantity || 1) * recipeScale; + const shareLinkStringMatches = url.matchAll(shareLinkRegex); if (shareLinkStringMatches) {