Skip to content

Commit 65a0f2c

Browse files
authored
Merge pull request #45 from DevCom-IITB/develop
UPDATE: username make required for forget password of external user
2 parents 1fd8edc + 0520107 commit 65a0f2c

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

src/app/auth.service.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,11 @@ export class AuthService {
160160
return this.roll_no;
161161
}
162162

163-
forgetPassword(email: any) {
163+
forgetPassword(username:any) {
164164
let url = this.baseurl.concat("/api/change_password");
165-
console.log(email)
166-
return this.http.patch<any>(url, {
165+
return this.http.put<any>(url, {
167166
requestType: 'Password_reset',
168-
email: email
167+
username: username
169168
}).pipe(
170169
catchError(err => {
171170
// Handle errors

src/app/mess-managerlogin/forget-password/forget-password.component.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ input{
8989
text-align: left;
9090
margin-bottom: 2%;
9191
}
92-
.inputbox {
93-
margin-top: 8.5vh;
92+
.inputbox2 {
93+
margin-top: 3vh;
9494
}
9595
button{
9696
color: #ffffff;

src/app/mess-managerlogin/forget-password/forget-password.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
<img class="img2-fluid" src="assets/images/document-sign.png" alt="document-sign-img" />
2626
</div>
2727
<div class="form">
28-
<form (ngSubmit)="onForgetSubmit(email.value)">
29-
<div class="inputbox">
30-
<input type="email" name="email" class="form-control" id="inputEmail" placeholder="Enter registered Email" required #email />
31-
<a [routerLink]="['/mess-manager']">Back to Login</a>
32-
<br/>
33-
<br/>
28+
<form (ngSubmit)="onForgetSubmit(username.value)">
29+
<div class="inputbox1">
30+
<input type="text" name="userID" class="form-control" id="userID" placeholder="UserID" required #username />
3431
</div>
32+
<a [routerLink]="['/mess-manager']">Back to Login</a>
33+
<br/>
34+
<br/>
3535
<button type="submit" style="margin-top: 3%;" class="btn btn-primary">Get Password</button>
3636
</form>
3737
</div>

src/app/mess-managerlogin/forget-password/forget-password.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export class ForgetPasswordComponent implements OnInit {
2525
});
2626
}
2727

28-
onForgetSubmit(email:any) {
29-
this.authService.forgetPassword(email).subscribe(
28+
onForgetSubmit(username:any) {
29+
this.authService.forgetPassword(username).subscribe(
3030
(res) => {
3131
console.log(res);
3232
this.success = true;

0 commit comments

Comments
 (0)