Skip to content

Commit

Permalink
Merge pull request #45 from DevCom-IITB/develop
Browse files Browse the repository at this point in the history
UPDATE: username make required for forget password of external user
  • Loading branch information
kumar-09 committed Aug 3, 2024
2 parents 1fd8edc + 0520107 commit 65a0f2c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
7 changes: 3 additions & 4 deletions src/app/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,11 @@ export class AuthService {
return this.roll_no;
}

forgetPassword(email: any) {
forgetPassword(username:any) {
let url = this.baseurl.concat("/api/change_password");
console.log(email)
return this.http.patch<any>(url, {
return this.http.put<any>(url, {
requestType: 'Password_reset',
email: email
username: username
}).pipe(
catchError(err => {
// Handle errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ input{
text-align: left;
margin-bottom: 2%;
}
.inputbox {
margin-top: 8.5vh;
.inputbox2 {
margin-top: 3vh;
}
button{
color: #ffffff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
<img class="img2-fluid" src="assets/images/document-sign.png" alt="document-sign-img" />
</div>
<div class="form">
<form (ngSubmit)="onForgetSubmit(email.value)">
<div class="inputbox">
<input type="email" name="email" class="form-control" id="inputEmail" placeholder="Enter registered Email" required #email />
<a [routerLink]="['/mess-manager']">Back to Login</a>
<br/>
<br/>
<form (ngSubmit)="onForgetSubmit(username.value)">
<div class="inputbox1">
<input type="text" name="userID" class="form-control" id="userID" placeholder="UserID" required #username />
</div>
<a [routerLink]="['/mess-manager']">Back to Login</a>
<br/>
<br/>
<button type="submit" style="margin-top: 3%;" class="btn btn-primary">Get Password</button>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export class ForgetPasswordComponent implements OnInit {
});
}

onForgetSubmit(email:any) {
this.authService.forgetPassword(email).subscribe(
onForgetSubmit(username:any) {
this.authService.forgetPassword(username).subscribe(
(res) => {
console.log(res);
this.success = true;
Expand Down

0 comments on commit 65a0f2c

Please sign in to comment.