Skip to content

Commit

Permalink
frontend: profile - change password
Browse files Browse the repository at this point in the history
confirm password field added
  • Loading branch information
rkshaon committed Jul 24, 2024
1 parent 47f6461 commit 851ebbe
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/user_api/urls/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@
v1_view.UserProfileView.as_view(),
name='profile',
),
path(
'changepassword',
v1_view.ChangeUserPasswordView.as_view(),
name='change_password',
)
]
5 changes: 5 additions & 0 deletions backend/user_api/views/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,8 @@ def post(self, request):
class UserProfileView(APIView):
def get(self, request, *args, **kwargs):
return Response(UserSerializer(request.user).data)


class ChangeUserPasswordView(APIView):
def put(self, request, *args, **kwargs):
return Response({})
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
<input type="text" class="form-control" id="exampleInputText2"
v-model="changePasswordData.newPassword">
</div>
<div class="mb-3">
<label for="exampleInputText2" class="form-label">Confirm Password</label>
<input type="text" class="form-control" id="exampleInputText2"
v-model="changePasswordData.confirmPassword">
</div>
</form>
</div>
<div class="modal-footer">
Expand Down Expand Up @@ -48,6 +53,7 @@ export default {
changePasswordData: {
currentPassword: '',
newPassword: '',
confirmPassword: '',
}
}
},
Expand Down

0 comments on commit 851ebbe

Please sign in to comment.