Project: Mall App Client: Maiora
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
458 B

  1. import { Injectable } from '@angular/core';
  2. import { HttpClient, HttpHeaders } from '@angular/common/http';
  3. import { URL } from '../mocks/url';
  4. @Injectable({
  5. providedIn: 'root'
  6. })
  7. export class AuthService {
  8. constructor(
  9. private http: HttpClient
  10. ) { }
  11. authenticateUser(credentials: { username: string, password: string, login_type: string }) {
  12. return this.http.post(URL + '/api/auth/signin', credentials).toPromise();
  13. }
  14. }