|
1234567891011121314151617181920212223242526 |
- import { Injectable } from '@angular/core';
- import { HttpClient, HttpHeaders } from '@angular/common/http';
- import { Observable, throwError } from 'rxjs';
- import { catchError, retry } from 'rxjs/operators';
-
- export interface NameCheckResponse {
- status: string;
- }
-
- @Injectable({
- providedIn: 'root'
- })
- export class RegisterBusinessNameService {
-
- constructor(private http: HttpClient) {
-
- }
-
- checkName(name: string) {
- const nameRequest = {
- name,
- };
-
- return this.http.post<NameCheckResponse>('http://localhost:10000/name-check/', nameRequest).toPromise();
- }
- }
|