easycomponentstools 1.0.0-dev.16 → 1.0.0-dev.17
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
CHANGED
|
@@ -150,8 +150,10 @@ const deletion = (id: string | number) => {
|
|
|
150
150
|
})
|
|
151
151
|
.then(async (response) => {
|
|
152
152
|
if (!response.ok) {
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
throw {
|
|
154
|
+
statusCode: response.status,
|
|
155
|
+
data: await response.json(),
|
|
156
|
+
}
|
|
155
157
|
}
|
|
156
158
|
return response.json()
|
|
157
159
|
})
|
|
@@ -173,8 +175,10 @@ const multipleDelete = () => {
|
|
|
173
175
|
})
|
|
174
176
|
.then(async (response) => {
|
|
175
177
|
if (!response.ok) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
+
throw {
|
|
179
|
+
statusCode: response.status,
|
|
180
|
+
data: await response.json(),
|
|
181
|
+
}
|
|
178
182
|
}
|
|
179
183
|
return response.json()
|
|
180
184
|
})
|
|
@@ -201,8 +205,10 @@ const getData = async () => {
|
|
|
201
205
|
fetch(`${props.api.get}?${params}`, { method: 'GET' })
|
|
202
206
|
.then(async (response) => {
|
|
203
207
|
if (!response.ok) {
|
|
204
|
-
|
|
205
|
-
|
|
208
|
+
throw {
|
|
209
|
+
statusCode: response.status,
|
|
210
|
+
data: await response.json(),
|
|
211
|
+
}
|
|
206
212
|
}
|
|
207
213
|
return response.json()
|
|
208
214
|
})
|