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

[BUG] post testimonials backend Fixed #1056

Merged
merged 3 commits into from
Jun 20, 2024

Conversation

Hemu21
Copy link
Contributor

@Hemu21 Hemu21 commented Jun 16, 2024

Issue that this pull request solves

Issue Link resolve #1054
Closes: #1054

Brief description of what is fixed or changed

  • We are using to save in image using multer. In backend the post testimonials is not used the multer. This leads to ask user to ask url from frontend. that will reduce user experience.
  • along with backend update we need to update the frontend for posting and getting of the image and data.
  • Need to update the image display process in frontend.

Now testimonial image saving and display is working fine.

Types of changes

Put an x in the boxes that apply

  • Bugfix (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)
  • Documentation update (Documentation content changed)
  • Other (please describe):

Checklist

Put an x in the boxes that apply

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • My changes does not break the current system and it passes all the current test cases.

@auto-assign auto-assign bot requested a review from Kajol-Kumari June 16, 2024 07:54
});
const upload = multer({ storage: store });

router.post('/', authMiddleware, upload.single('image'), postTestimonial);

Check failure

Code scanning / CodeQL

Missing rate limiting High test

This route handler performs
authorization
, but is not rate-limited.
@Hemu21
Copy link
Contributor Author

Hemu21 commented Jun 16, 2024

@Kajol-Kumari can you please check and merge it.

Copy link
Member

@Kajol-Kumari Kajol-Kumari left a comment

Choose a reason for hiding this comment

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

minor comment

@Hemu21
Copy link
Contributor Author

Hemu21 commented Jun 17, 2024

@Kajol-Kumari can you please tell what are the minor comments

}else{
formattedPath = "./images/testimonialImg.png";
}
_data[index].image = formattedPath;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Kajol-Kumari This is the function we used to get data. here I made small chage if image exist. we use that url else we use default image a url.

@Hemu21
Copy link
Contributor Author

Hemu21 commented Jun 17, 2024

@Kajol-Kumari I had made it as if user provide the image we use it and display it. if user doesn't provide then no need to save default. instead we can show them default in frontend. I check it is working. you can check in the preview you can see the default images.

@Kajol-Kumari Kajol-Kumari added level2 Bug fixing, adding small features. gssoc GSSoC'24 Label labels Jun 20, 2024
@Kajol-Kumari Kajol-Kumari merged commit a9ddf03 into HITK-TECH-Community:main Jun 20, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc GSSoC'24 Label level2 Bug fixing, adding small features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] post testimonials backend
2 participants