mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-19 05:09:40 +02:00
add expiring share links to url recipe actions
This commit is contained in:
parent
b00c9acd5c
commit
da8aaabe07
1 changed files with 3 additions and 3 deletions
|
@ -50,13 +50,13 @@ export const useGroupRecipeActions = function (
|
|||
}
|
||||
|
||||
async function parseRecipeActionUrl(url: string, recipe: Recipe, recipeScale: number): Promise<string> {
|
||||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue