mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 07:39:41 +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> {
|
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 */
|
/* eslint-disable no-template-curly-in-string */
|
||||||
const shareLinkRegex = /\$\{share-link-expires-seconds-[0-9]+\}/g;
|
const shareLinkRegex = /\$\{share-link-expires-seconds-[0-9]+\}/g;
|
||||||
const group = (await api.groups.getOne(recipe.groupId || "")).data;
|
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);
|
const shareLinkStringMatches = url.matchAll(shareLinkRegex);
|
||||||
if (shareLinkStringMatches) {
|
if (shareLinkStringMatches) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue