File tree Expand file tree Collapse file tree 4 files changed +13
-14
lines changed
mess-managerlogin/forget-password Expand file tree Collapse file tree 4 files changed +13
-14
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 8989 text-align : left;
9090 margin-bottom : 2% ;
9191}
92- .inputbox {
93- margin-top : 8.5 vh ;
92+ .inputbox2 {
93+ margin-top : 3 vh ;
9494}
9595button {
9696 color : # ffffff ;
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments