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

feat : if slug is empty, use id #334

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

guesung
Copy link
Contributor

@guesung guesung commented Feb 1, 2024

Description

What I Did

  • Identified an issue where the slug value was empty in certain blog posts.
  • Implemented a fallback mechanism where, if the slug is missing, the post's ID is used instead.

Proposal

  • Problem: The current implementation of the blog relies heavily on slug values for operations. However, in cases where the slug is absent, this could lead to unforeseen errors or dysfunctional behavior.
  • Solution: My proposal is to modify the logic so that in the absence of a slug value, the system gracefully falls back to using the post's unique ID. This ensures continuity of functionality and enhances the robustness of the system.

Related tickets

https://github.com/morethanmin/morethan-log/issues/XX

PR Checklist

Copy link

vercel bot commented Feb 1, 2024

Someone is attempting to deploy a commit to a Personal Account owned by @morethanmin on Vercel.

@morethanmin first needs to authorize it.

Copy link

vercel bot commented Feb 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
morethan-log ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 1, 2024 1:56pm

Copy link
Owner

@morethanmin morethanmin left a comment

Choose a reason for hiding this comment

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

Thank you for submitting the pull request! 😄

I have some concerns about modifying data in the filterPosts function. It would be preferable to set a fallback for the slug in the getPosts function instead.

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.

2 participants