File tree Expand file tree Collapse file tree 2 files changed +3
-33
lines changed
Expand file tree Collapse file tree 2 files changed +3
-33
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ const recognition_endpoints = {
129129 } ,
130130
131131 /**
132- * Delete image according to their id number
132+ * Delete image(s)
133133 * @param {String } url
134134 * @param {String } api_key
135135 * @returns {Promise }
@@ -140,36 +140,6 @@ const recognition_endpoints = {
140140 "x-api-key" : api_key
141141 } } )
142142
143- return response ;
144- } ,
145-
146- /**
147- * Delete image according to their subject name
148- * @param {String } url
149- * @param {String } api_key
150- * @returns {Promise }
151- */
152- async delete_all_subject_request ( url , api_key ) {
153- const response = await axios . delete ( url , {
154- headers : {
155- "x-api-key" : api_key
156- } } )
157-
158- return response ;
159- } ,
160-
161- /**
162- * Delete all images
163- * @param {String } url
164- * @param {String } api_key
165- * @returns {Promise }
166- */
167- async delete_all_request ( url , api_key ) {
168- const response = await axios . delete ( url , {
169- headers : {
170- "x-api-key" : api_key
171- } } )
172-
173143 return response ;
174144 }
175145}
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ class RecognitionService {
195195 url = `${ url } ?subject=${ subject } ` ;
196196
197197 return new Promise ( ( resolve , reject ) => {
198- recognition_endpoints . delete_all_subject_request ( url , key )
198+ recognition_endpoints . delete_request ( url , key )
199199 . then ( response => {
200200 return resolve ( response . data ) ;
201201 } )
@@ -211,7 +211,7 @@ class RecognitionService {
211211 */
212212 delete_all ( ) {
213213 return new Promise ( ( resolve , reject ) => {
214- recognition_endpoints . delete_all_request ( url , key )
214+ recognition_endpoints . delete_request ( url , key )
215215 . then ( response => {
216216 return resolve ( response . data ) ;
217217 } )
You can’t perform that action at this time.
0 commit comments