@veritree/services 2.27.1 → 2.27.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/endpoints/evidence.js +32 -5
package/package.json
CHANGED
|
@@ -6,14 +6,41 @@ class EvidenceApi extends Api {
|
|
|
6
6
|
this.resource = "evidence";
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
image(imageId, params) {
|
|
10
|
+
|
|
10
11
|
let url = `${this.getUrl()}/image/${imageId}${this.getUrlParams(params)}`
|
|
11
|
-
|
|
12
|
+
|
|
13
|
+
const single = async () => {
|
|
14
|
+
return await this.get(url);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const remove = async () => {
|
|
18
|
+
return await this.post(url, null, 'delete');
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
single,
|
|
24
|
+
delete: remove,
|
|
25
|
+
};
|
|
12
26
|
}
|
|
13
27
|
|
|
14
|
-
|
|
15
|
-
let url = `${this.getUrl()}/attachment/${
|
|
16
|
-
|
|
28
|
+
attachment(attachmentId, params) {
|
|
29
|
+
let url = `${this.getUrl()}/attachment/${attachmentId}${this.getUrlParams(params)}`
|
|
30
|
+
|
|
31
|
+
const single = async () => {
|
|
32
|
+
return await this.get(url);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const remove = async () => {
|
|
36
|
+
return await this.post(url, null, 'delete');
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
single,
|
|
42
|
+
delete: remove,
|
|
43
|
+
};
|
|
17
44
|
}
|
|
18
45
|
}
|
|
19
46
|
|