jamespot-front-business 1.1.92 → 1.1.93
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/dist/cjs.js +14 -5
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +14 -5
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +377 -347
- package/package.json +2 -2
package/dist/esm.js
CHANGED
|
@@ -1387,9 +1387,17 @@ const toggleExtraBotActivation = createAsyncThunk('extraBot/toggleActivation', (
|
|
|
1387
1387
|
try {
|
|
1388
1388
|
const enabled = !extraBot.enabled;
|
|
1389
1389
|
const res = (yield extra.jApi.article.update(Object.assign(Object.assign({}, extraBot), { enabled }), { format: Format.VIEW })).result;
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1390
|
+
if (res.enabled !== extraBot.enabled) {
|
|
1391
|
+
dispatch(Toast.actions.success({
|
|
1392
|
+
label: enabled ? 'APP_ExtraBot_Toast_ActivationSuccess' : 'APP_ExtraBot_Toast_DeactivationSuccess',
|
|
1393
|
+
}));
|
|
1394
|
+
dispatch(fetchExtraBotListAll());
|
|
1395
|
+
}
|
|
1396
|
+
else {
|
|
1397
|
+
dispatch(Toast.actions.error({
|
|
1398
|
+
label: 'APP_ExtraBot_Toast_FailedToChangeActivation',
|
|
1399
|
+
}));
|
|
1400
|
+
}
|
|
1393
1401
|
return res;
|
|
1394
1402
|
}
|
|
1395
1403
|
catch (err) {
|
|
@@ -1406,8 +1414,9 @@ const saveExtraBot = createAsyncThunk('extraBot/save', ({ extraBot }, { extra, r
|
|
|
1406
1414
|
let user;
|
|
1407
1415
|
delete data.avatar;
|
|
1408
1416
|
if (extraBot.uri) {
|
|
1409
|
-
res = (yield extra.jApi.article.update(data, {
|
|
1410
|
-
.
|
|
1417
|
+
res = (yield extra.jApi.article.update(data, {
|
|
1418
|
+
format: Format.VIEW,
|
|
1419
|
+
})).result;
|
|
1411
1420
|
user = (yield extra.jApi.extraBot.updateBot(res.uri)).result;
|
|
1412
1421
|
}
|
|
1413
1422
|
else {
|