Commit 90f0a050 authored by RenanMontenegro3's avatar RenanMontenegro3

"feat:adição do environment.ts"

parent 33475603
......@@ -4,16 +4,16 @@ import { catchError, tap } from 'rxjs/operators';
import { AsyncValidatorFn, AbstractControl, ValidationErrors, Validators } from '@angular/forms';
import { map } from 'rxjs/operators';
import { Injectable } from '@angular/core';
import { environment } from '../../../environments/environment'; // Importa o environment
@Injectable({
providedIn: 'root'
})
export class BlackListService {
users:any[]=[];
private apiUrl = 'http://localhost:8080/api/black-list';
private apiUrl_verifica_imo = 'http://localhost:8080/api/vdatas';
users: any[] = [];
private apiUrl = environment.API_URL + '/api/black-list';
private apiUrl_verifica_imo = environment.API_URL + '/api/vdatas';
constructor(private _http: HttpClient) {}
......@@ -37,7 +37,6 @@ export class BlackListService {
}));
}
getEmployeeList(pageIndex: number, pageSize: number): Observable<any> {
let params = new HttpParams()
.set('page', pageIndex.toString())
......
......@@ -5,14 +5,15 @@ import { AsyncValidatorFn, AbstractControl, ValidationErrors, Validators } from
import { map } from 'rxjs/operators';
import { Injectable } from '@angular/core';
import { of } from 'rxjs';
import { environment } from '../../../environments/environment'; // Importa o environment
@Injectable({
providedIn: 'root'
})
export class AceiteService {
users: any[] = [];
private apiUrl = 'http://localhost:8080/api/accepts';
private apiUrl_verifica_imo = 'http://localhost:8080/api/vdatas';
private apiUrl = environment.API_URL + '/api/accepts';
private apiUrl_verifica_imo = environment.API_URL + '/api/vdatas';
constructor(private _http: HttpClient) { }
......
......@@ -5,6 +5,7 @@ import { AsyncValidatorFn, AbstractControl, ValidationErrors, Validators } from
import { map} from 'rxjs/operators';
import { Injectable } from '@angular/core';
import { of } from 'rxjs';
import { environment } from '../../../environments/environment'; // Importa o environment
@Injectable({
providedIn: 'root'
......@@ -12,7 +13,7 @@ import { of } from 'rxjs';
export class BercosService {
users:any[]=[];
private apiUrl = 'http://localhost:8080/api/bercos';
private apiUrl = environment.API_URL + '/api/bercos';
constructor(private _http: HttpClient) {}
......
......@@ -2,12 +2,13 @@ import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { LoginResponse } from '../types/login-response.type';
import { tap } from 'rxjs';
import { environment } from '../../environments/environment'; // Importa o environment
@Injectable({
providedIn: 'root'
})
export class LoginService {
apiUrl: string = "http://localhost:8080/api/auth"
apiUrl: string = environment.API_URL + "/api/auth"; // Usa a variável do environment
constructor(private httpClient: HttpClient) { }
......
......@@ -6,14 +6,15 @@ import {
} from '@angular/common/http';
import { Observable, throwError } from 'rxjs';
import { catchError, tap } from 'rxjs/operators';
import { environment } from '../../environments/environment'; // Importa o environment
@Injectable({
providedIn: 'root',
})
export class NavioService {
users: any[] = [];
private apiUrl = 'http://localhost:8080/api/vessels';
private apiUrlDash = 'http://localhost:8080/statistics/all';
private apiUrl = environment.API_URL + '/api/vessels';
private apiUrlDash = environment.API_URL + '/statistics/all';
constructor(private _http: HttpClient) {}
addEmployee1(data: any, foto: File): Observable<any> {
......
import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { catchError, Observable, tap, throwError } from 'rxjs';
import { environment } from '../../../environments/environment'; // Importa o environment
@Injectable({
providedIn: 'root'
})
export class UserService {
private apiUrl = 'http://localhost:8080/api/users'; // Certifique-se de que a URL está correta
private apiUrl = environment.API_URL + '/api/users'; // Usa a variável do environment
private users: any; // Adicione a propriedade users
constructor(private _http: HttpClient) {}
......
export const environment = {
production: false,
API_URL: 'http://aceite-tecnico-back:9090'
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment