Last change
on this file was 8423429, checked in by AngelNasev <angel.nasev@…>, 17 months ago |
Add backend and frontend projects
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | import { Injectable } from '@angular/core';
|
---|
2 | import {HttpClient} from "@angular/common/http";
|
---|
3 | import {forkJoin, Observable} from "rxjs";
|
---|
4 | import {Query1Interface} from "./Query1Interface";
|
---|
5 |
|
---|
6 | import {Query2Interface} from "./Query2Interface";
|
---|
7 | import {Query3Interface} from "./Query3Interface";
|
---|
8 | import {Query4Interface} from "./Query4Interface";
|
---|
9 | import {Query5Interface} from "./Query5Interface";
|
---|
10 |
|
---|
11 |
|
---|
12 | @Injectable({
|
---|
13 | providedIn: 'root'
|
---|
14 | })
|
---|
15 | export class AdminPanelService {
|
---|
16 | url = "http://localhost:8080/api/admin/admin-panel"
|
---|
17 |
|
---|
18 | constructor(private http: HttpClient) {
|
---|
19 | }
|
---|
20 | getFirstQuery():Observable<Query1Interface[]> {
|
---|
21 | return this.http.get<Query1Interface[]>(this.url+'/1')
|
---|
22 | }
|
---|
23 | getSecondQuery():Observable<Query2Interface[]>{
|
---|
24 | return this.http.get<Query2Interface[]>(this.url+'/2')
|
---|
25 | }
|
---|
26 | getThirdQuery():Observable<Query3Interface[]>{
|
---|
27 | return this.http.get<Query3Interface[]>(this.url+'/3')
|
---|
28 | }
|
---|
29 | getFourthQuery():Observable<Query4Interface[]>{
|
---|
30 | return this.http.get<Query4Interface[]>(this.url+'/4')
|
---|
31 | }
|
---|
32 | getFifthQuery():Observable<Query5Interface[]>{
|
---|
33 | return this.http.get<Query5Interface[]>(this.url+'/5')
|
---|
34 | }
|
---|
35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.