source: Sources/frontend/src/app/admin-panel.service.ts@ 8423429

Last change on this file since 8423429 was 8423429, checked in by AngelNasev <angel.nasev@…>, 15 months ago

Add backend and frontend projects

  • Property mode set to 100644
File size: 1.1 KB
Line 
1import { Injectable } from '@angular/core';
2import {HttpClient} from "@angular/common/http";
3import {forkJoin, Observable} from "rxjs";
4import {Query1Interface} from "./Query1Interface";
5
6import {Query2Interface} from "./Query2Interface";
7import {Query3Interface} from "./Query3Interface";
8import {Query4Interface} from "./Query4Interface";
9import {Query5Interface} from "./Query5Interface";
10
11
12@Injectable({
13 providedIn: 'root'
14})
15export 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.