mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-02 20:15:24 +02:00
feat: Improve Public URL Readability (#2482)
* added support for group slugs * modified frontend to use links with group slug * fixed test refs * unused import --------- Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
parent
99372aa2b6
commit
095edef95e
12 changed files with 166 additions and 18 deletions
|
@ -18,7 +18,7 @@ export default defineComponent({
|
|||
setup() {
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const groupId = route.value.params.groupId;
|
||||
const groupSlug = route.value.params.groupSlug;
|
||||
const slug = route.value.params.slug;
|
||||
const api = usePublicApi();
|
||||
|
||||
|
@ -26,7 +26,7 @@ export default defineComponent({
|
|||
const { recipeMeta } = useRecipeMeta();
|
||||
|
||||
const recipe = useAsync(async () => {
|
||||
const { data, error } = await api.explore.recipe(groupId, slug);
|
||||
const { data, error } = await api.explore.recipe(groupSlug, slug);
|
||||
|
||||
if (error) {
|
||||
console.error("error loading recipe -> ", error);
|
Loading…
Add table
Add a link
Reference in a new issue