-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
committed
Oct 18, 2023
1 parent
26be945
commit b8e4724
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
16 changes: 16 additions & 0 deletions
16
src/app/Feature/auth/services/loginservice.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
|
||
import { LoginserviceService } from './loginservice.service'; | ||
|
||
describe('LoginserviceService', () => { | ||
let service: LoginserviceService; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({}); | ||
service = TestBed.inject(LoginserviceService); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(service).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import {Injectable} from '@angular/core'; | ||
import {HttpClient} from "@angular/common/http"; | ||
import {Loginmodel} from "../model/Loginmodel"; | ||
import {Observer} from "rxjs"; | ||
import {logingrespons} from "../model/logingrespons"; | ||
import {environment} from "../../../../environments/environment"; | ||
import {Observable} from "rxjs/internal/Observable"; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class LoginserviceService { | ||
|
||
constructor(private htt: HttpClient) { | ||
} | ||
|
||
|
||
login(loginrequset: Loginmodel): Observable<logingrespons> { | ||
return this.htt.post<logingrespons>(`${environment.baseapi}/api/Athu/login`, { | ||
Email: loginrequset.Email, | ||
password: loginrequset.password | ||
}); | ||
} | ||
} |