]>
Commit | Line | Data |
---|---|---|
20effc67 TL |
1 | import { HttpClient } from '@angular/common/http'; |
2 | import { Injectable } from '@angular/core'; | |
3 | ||
4 | import * as _ from 'lodash'; | |
5 | ||
6 | @Injectable({ | |
7 | providedIn: 'root' | |
8 | }) | |
9 | export class FeedbackService { | |
10 | constructor(private http: HttpClient) {} | |
11 | baseUIURL = 'api/feedback'; | |
12 | ||
13 | isKeyExist() { | |
14 | return this.http.get('ui-api/feedback/api_key/exist'); | |
15 | } | |
16 | ||
17 | createIssue( | |
18 | project: string, | |
19 | tracker: string, | |
20 | subject: string, | |
21 | description: string, | |
22 | apiKey: string | |
23 | ) { | |
24 | return this.http.post( | |
25 | 'api/feedback', | |
26 | { | |
27 | project: project, | |
28 | tracker: tracker, | |
29 | subject: subject, | |
30 | description: description, | |
31 | api_key: apiKey | |
32 | }, | |
33 | { | |
34 | headers: { Accept: 'application/vnd.ceph.api.v0.1+json' } | |
35 | } | |
36 | ); | |
37 | } | |
38 | } |