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

update functionality for Admin profile #931

Merged
merged 8 commits into from
May 22, 2024

Conversation

SwayamRana808
Copy link
Contributor

Issue that this pull request solves

Closes: #896

Proposed changes

[Frontend] Introduce Update Admin Functionality

Brief description of what is fixed or changed

Introduce Update Admin Functionality and also backend api updated

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.

Screenshots

Please attach the screenshots of the changes made in case of change in user interface

Untitled.video.-.Made.with.Clipchamp.mp4

Other information

Any other information that is important to this pull request

@auto-assign auto-assign bot requested a review from jackfrost13 May 19, 2024 06:13
@@ -33,7 +46,7 @@
router.post('/resetpassword/:token', validationMiddleware(resetPasswordSchema), resetPassword);

router.put('/password', validationMiddleware(passwordChangeSchema), authMiddleware, changePassword);
router.put('/:id/:token', validationMiddleware(updateAdminSchema), updateAdmin);
router.put('/:id/:token', validationMiddleware(updateAdminSchema),upload.single('image') ,updateAdmin);

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
a database access
, but is not rate-limited.
This route handler performs
a file system access
, but is not rate-limited.
This route handler performs
a file system access
, but is not rate-limited.
This route handler performs
a database access
, but is not rate-limited.
backend/app/routes/admin/updateAdmin.js Fixed Show fixed Hide fixed
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.

Screenshot 2024-05-19 at 11 57 23 AM

The update detail isn't getting reflected, atleast i should have seen the first name/lastname getting updated as image changes are in this pr

backend/app/routes/admin/getAdmins.js Outdated Show resolved Hide resolved
backend/app/routes/admin/updateAdmin.js Show resolved Hide resolved
@Kajol-Kumari Kajol-Kumari removed the request for review from jackfrost13 May 19, 2024 06:30
@Kajol-Kumari
Copy link
Member

@SwayamRana808 let me know when u are done fixing the requested changes as i can see the current state of this pr is not good, a lot of un-necessary changes are there and functionality is still not intact

@SwayamRana808
Copy link
Contributor Author

i have changed response json but still it showing in network tab

Screenshot 2024-05-20 212920

it should have shown something like this --
Screenshot 2024-05-20 213244

@Kajol-Kumari can you please have look on this

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.

Screenshot 2024-05-22 at 9 40 52 PM The phone number field keeps on giving error, can u check this?

@SwayamRana808
Copy link
Contributor Author

SwayamRana808 commented May 22, 2024

Screenshot 2024-05-22 at 9 40 52 PM The phone number field keeps on giving error, can u check this?

number should start with 9-6 it was validity check if number is from India its was already defined in backend
here validationSchema updateAdmin contact schema 6-9

@Kajol-Kumari Kajol-Kumari added level3 New features, major bug fixing. gssoc GSSoC'24 Label labels May 22, 2024
@Kajol-Kumari Kajol-Kumari merged commit 9c7e4b9 into HITK-TECH-Community:main May 22, 2024
6 of 7 checks passed
@SwayamRana808 SwayamRana808 deleted the updateAdmin branch May 31, 2024 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc GSSoC'24 Label level3 New features, major bug fixing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Frontend] Introduce Update Admin Functionality
2 participants