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

docs : fix variable assignment and importing PostRepository #4286

Merged

Conversation

Shiva953
Copy link
Contributor

Closes #3958

To resolve this issue, I have made the following changes:

Imported the PostRepository module, which was missing in the previous step.
Declared the postRepository variable as a protected readonly property of type typeof PostRepository in the service class.

Please review these changes and provide your feedback. If there are any further changes or improvements needed, please let me know and I'll be happy to make the necessary adjustments.

Thank you!

@Shiva953 Shiva953 requested a review from a team as a code owner June 12, 2023 09:58
@changeset-bot
Copy link

changeset-bot bot commented Jun 12, 2023

⚠️ No Changeset found

Latest commit: 641250a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jun 12, 2023

@Shiva953 is attempting to deploy a commit to the medusajs Team on Vercel.

A member of the Team first needs to authorize it.


class PostService extends TransactionBaseService {
protected readonly postRepository: typeof PostRepository;
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: We generally suffix with _ to give the flexibility to have a getter and avoid any name conflict.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

Copy link
Member

@shahednasser shahednasser left a comment

Choose a reason for hiding this comment

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

@Shiva953 can you follow this guide to fix the ESLint errors?

@Shiva953 Shiva953 requested a review from shahednasser June 12, 2023 12:56
Copy link
Member

@shahednasser shahednasser left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for your contribution @Shiva953 !

@shahednasser shahednasser merged commit 2ebc3da into medusajs:develop Jun 12, 2023
olivermrbl pushed a commit that referenced this pull request Jun 14, 2023
* fix variable assignment and import in step-5

* update with postRepository_ suffix for flexibility and avoiding name conflicts

* fixed ESLint Errors
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.

Docs(Code Issue): Code Issue in /development/entities/create
3 participants