blob: 28b1852040e18f56586348b586d10a4489ac9a83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {environment} from '../../environments/environment';
import {Command} from '../model/command';
import {CommandSerializer} from '../serializer/command.serializer';
import {ResourceService} from 'globunet-angular/core/providers/api/resource.service';
import {Observable} from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class CommandService extends ResourceService<Command> {
constructor(http: HttpClient) {
super(http, environment.API_URL, 'commands', new CommandSerializer());
}
execute(params): Observable<any> {
const url = this.url + '/commands/executes.json';
return this.httpClient.post(url, params);
}
}
|