Change messageservice, base url added for different server
This commit is contained in:
parent
3583acfcc5
commit
52c19cee63
2 changed files with 4 additions and 5 deletions
|
|
@ -1,8 +1,6 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
|
||||
import {Observable} from 'rxjs';
|
||||
import {environment} from "../../../environments/environment";
|
||||
|
||||
export interface JSdata{
|
||||
status: string;
|
||||
|
|
@ -16,8 +14,8 @@ export interface JSdata{
|
|||
export class MessageService {
|
||||
|
||||
constructor(private http: HttpClient) { }
|
||||
sendMessage(url: string, data: any): Observable<JSdata> {
|
||||
const CreatURL = environment.urlCL.concat('/').concat(url);
|
||||
sendMessage(baseurl: string, url: string, data: any): Observable<JSdata> {
|
||||
const CreatURL = baseurl.concat('/').concat(url);
|
||||
//console.log(CreatURL, data);
|
||||
return this.http.post<JSdata>(
|
||||
CreatURL,
|
||||
|
|
|
|||
Reference in a new issue