fix .
This commit is contained in:
@@ -2,7 +2,8 @@ import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
const AUTH_API = 'http://localhost:8080/api/auth/';
|
||||
// Используем относительный путь вместо хардкода http://localhost:8080/api/auth/
|
||||
const AUTH_API = '/api/auth/';
|
||||
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({ 'Content-Type': 'application/json' })
|
||||
|
||||
@@ -3,7 +3,8 @@ import { HttpClient } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Role } from '../models/role';
|
||||
|
||||
const API_URL = 'http://localhost:8080/api/roles';
|
||||
// Используем относительный путь вместо хардкода http://localhost:8080/api/roles
|
||||
const API_URL = '/api/roles';
|
||||
|
||||
|
||||
@Injectable({
|
||||
|
||||
@@ -3,7 +3,8 @@ import { HttpClient } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Tutorial } from '../models/tutorial.model';
|
||||
|
||||
const baseUrl = 'http://localhost:8080/api/tutorials';
|
||||
// Используем относительный путь вместо хардкода http://localhost:8080/api/tutorials
|
||||
const baseUrl = '/api/tutorials';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
|
||||
@@ -4,7 +4,8 @@ import { Observable } from 'rxjs';
|
||||
import {User} from "../models/user.model";
|
||||
import {Tutorial} from "../models/tutorial.model";
|
||||
|
||||
const API_URL = 'http://localhost:8080/api/users';
|
||||
// Используем относительный путь вместо хардкода http://localhost:8080/api/users
|
||||
const API_URL = '/api/users';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
|
||||
Reference in New Issue
Block a user