@internetarchive/ia-book-actions 0.0.6-7 → 0.0.6-8
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
|
@@ -8,11 +8,8 @@ export default function ActionsHandlerService(options) {
|
|
|
8
8
|
const option = {
|
|
9
9
|
action: null,
|
|
10
10
|
identifier: '',
|
|
11
|
-
data: {},
|
|
12
11
|
success() {},
|
|
13
12
|
error() {},
|
|
14
|
-
loader: true,
|
|
15
|
-
type: 'POST',
|
|
16
13
|
...options,
|
|
17
14
|
};
|
|
18
15
|
|
|
@@ -35,8 +32,10 @@ export default function ActionsHandlerService(options) {
|
|
|
35
32
|
// test changes, (won't affect you)
|
|
36
33
|
if (baseHost == '/demo/1' || baseHost == '/demo/') {
|
|
37
34
|
if (option.action == 'create_token') {
|
|
35
|
+
// return {'success': false, 'error': 'loan token not found. please try again later.',};
|
|
38
36
|
return {
|
|
39
|
-
|
|
37
|
+
success: true,
|
|
38
|
+
token: '1640945898-f77a0cb615190798f1faf2dafe277b2e',
|
|
40
39
|
};
|
|
41
40
|
}
|
|
42
41
|
|
|
@@ -187,15 +187,9 @@ export default class ActionsHandler extends LitElement {
|
|
|
187
187
|
|
|
188
188
|
handleLoanTokenPoller() {
|
|
189
189
|
const context = 'create_token';
|
|
190
|
-
this.ActionError(context);
|
|
191
|
-
|
|
192
190
|
ActionsHandlerService({
|
|
193
191
|
identifier: this.identifier,
|
|
194
192
|
action: context,
|
|
195
|
-
loader: false,
|
|
196
|
-
success: () => {
|
|
197
|
-
this.handleReadItNow();
|
|
198
|
-
},
|
|
199
193
|
error: data => {
|
|
200
194
|
this.ActionError(context, data);
|
|
201
195
|
},
|