Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update Mealie service component endpoints #723

Merged

Conversation

bobonthenet
Copy link
Contributor

Description

The endpoints used in the Mealie service component were incorrect and have been updated.

Fixes #721

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I've read & comply with the contributing guidelines
  • I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • I have made corresponding changes to the documentation (README.md).
  • I've checked my modifications for any breaking changes, especially in the config.yml file

Copy link

netlify bot commented Nov 16, 2023

Deploy Preview for homer-demo-content ready!

Name Link
🔨 Latest commit 5b3aa21
🔍 Latest deploy log https://app.netlify.com/sites/homer-demo-content/deploys/65556957335cf90008e903f0
😎 Deploy Preview https://deploy-preview-723--homer-demo-content.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rhardih
Copy link
Contributor

rhardih commented Sep 30, 2024

I ran into this issue today. Would love to see this merged and released.

Copy link
Owner

@bastienwirtz bastienwirtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this @bobonthenet! Everthing looks fine.

@bastienwirtz bastienwirtz merged commit 0e5106c into bastienwirtz:main Oct 26, 2024
@rhardih
Copy link
Contributor

rhardih commented Oct 31, 2024

@bobonthenet did this fix the issue for you? I'm seeing an exception still. I think the data might not adhere to the expected format anymore, despite hitting the right endpoint now:

index-ttry7KsC.js:14 TypeError: Cannot read properties of undefined (reading 'recipe')
    at Mealie-BXsIlQtJ.js:1:926
    at n (index-ttry7KsC.js:14:2156)
    at Us (index-ttry7KsC.js:14:7270)
    at Proxy.ep (index-ttry7KsC.js:148:18491)
    at $i (index-ttry7KsC.js:14:29872)
    at Xo.L [as fn] (index-ttry7KsC.js:14:21807)
    at Xo.run (index-ttry7KsC.js:10:1665)
    at Xo.runIfDirty (index-ttry7KsC.js:10:1975)
    at tn (index-ttry7KsC.js:14:46)
    at bl (index-ttry7KsC.js:14:1796)

The response from the statistics endpoint look like this now:

{
    "totalRecipes": 95,
    "totalUsers": 2,
    "totalGroups": 1,
    "uncategorizedRecipes": 22,
    "untaggedRecipes": 1
}

@rhardih
Copy link
Contributor

rhardih commented Oct 31, 2024

Sorry the above was a red herring, I think it's the request to the /api/groups/mealplans/today endpoint. It can be an empty array, but there's no empty check here: https://github.com/bastienwirtz/homer/blob/main/src/components/services/Mealie.vue#L9

I don't have a working dev environment for homer at the moment, but might give it a try for a fix.

@rhardih
Copy link
Contributor

rhardih commented Oct 31, 2024

Here's a new PR with the fix:

#819

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mealie Custom Service is not working
4 participants