diff --git a/src/app/pages/home/home.page.scss b/src/app/pages/home/home.page.scss index 0115e12..f5fe786 100644 --- a/src/app/pages/home/home.page.scss +++ b/src/app/pages/home/home.page.scss @@ -1,11 +1,3 @@ -/* - Authors : initappz (Rahul Jograna) - Website : https://initappz.com/ - App Name : E-Learning App Template - This App Template Source code is licensed as per the - terms found in the Website https://initappz.com/license - Copyright and Good Faith Purchasers © 2021-present initappz. -*/ ion-header { --background: white; border-bottom: 0; diff --git a/src/app/pages/home/home.page.spec.ts b/src/app/pages/home/home.page.spec.ts index c6f99f7..4f598ab 100644 --- a/src/app/pages/home/home.page.spec.ts +++ b/src/app/pages/home/home.page.spec.ts @@ -1,11 +1,3 @@ -/* - Authors : initappz (Rahul Jograna) - Website : https://initappz.com/ - App Name : E-Learning App Template - This App Template Source code is licensed as per the - terms found in the Website https://initappz.com/license - Copyright and Good Faith Purchasers © 2021-present initappz. -*/ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index c646adc..28d549e 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -12,6 +12,7 @@ export class LoginPage implements OnInit { @ViewChild('username') username; @ViewChild('password') password; loginResult: any; + blogResult:any; constructor( private router: Router, @@ -22,6 +23,15 @@ export class LoginPage implements OnInit { ngOnInit() { } +getBlogData(){ + this.wrenchService.getBlogData().subscribe( + blogResult => { + this.blogResult = blogResult; + console.log("BLOG RETURN->" + this.blogResult); + } + ); +} + loginData: { username: string, password: string, sessionid: string }; @@ -36,11 +46,11 @@ export class LoginPage implements OnInit { this.loginResult = loginResult; console.log("INTERNAL RETURN->" + this.loginResult.internal_return); if (loginResult != null && loginResult.internal_return == 100 && this.sessionDataProviderService.ConstructGlobalSessionData(this.loginResult) == true) { + this.getBlogData(); this.router.navigate(['tabs/tab1']); } } ); - //this.router.navigate(['tabs/tab1']); } onForgot() { diff --git a/src/app/services/wrench.service.ts b/src/app/services/wrench.service.ts index 0788323..e39af3d 100644 --- a/src/app/services/wrench.service.ts +++ b/src/app/services/wrench.service.ts @@ -25,10 +25,14 @@ export class WrenchService { } loginUser(loginData) { - - return this.getPostData('userlogin',loginData); } + + getBlogData(){ + const blogReq=[]; + return this.getPostData('blogdata',blogReq); + //blogdata + } /* registerUser(newUserData) { // no session needed - will start the session diff --git a/src/app/store/blog-data.service.spec.ts b/src/app/store/blog-data.service.spec.ts new file mode 100644 index 0000000..b7e522e --- /dev/null +++ b/src/app/store/blog-data.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { BlogDataService } from './blog-data.service'; + +describe('BlogDataService', () => { + let service: BlogDataService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(BlogDataService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/store/blog-data.service.ts b/src/app/store/blog-data.service.ts new file mode 100644 index 0000000..4ef33c4 --- /dev/null +++ b/src/app/store/blog-data.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class BlogDataService { + + constructor() { } +}