Skip to content

Commit

Permalink
allow initCheckout set true
Browse files Browse the repository at this point in the history
  • Loading branch information
Xziy committed Jun 1, 2024
1 parent c83d3be commit 0b2aa9a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libs/DialogBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class DialogBox {
// Check JsonSchema
if (!validate(dialog)) {
sails.log.error(`${dialog} not match with config schema`);
sails.log.error(validate.errors);
sails.log.error(JSON.stringify(validate.errors, null, 2));
throw `DialogBox config not valid`;
}
function sleep(ms) {
Expand Down
4 changes: 2 additions & 2 deletions libs/helpers/OrderHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class OrderHelper {
static async initCheckout(populatedOrder) {
let initCheckout = {
worktimeIntervals: [],
allowSoonAsPossible: false,
allowOrderToTime: false,
allowSoonAsPossible: true,
allowOrderToTime: true,
nonce: 0
};
await emitter.emit('core:order-init-checkout', populatedOrder, initCheckout);
Expand Down
4 changes: 2 additions & 2 deletions libs/helpers/OrderHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export class OrderHelper {
public static async initCheckout(populatedOrder: Order): Promise<InitCheckout> {
let initCheckout: InitCheckout = {
worktimeIntervals: [],
allowSoonAsPossible: false,
allowOrderToTime: false,
allowSoonAsPossible: true,
allowOrderToTime: true,
nonce: 0
}
await emitter.emit('core:order-init-checkout', populatedOrder, initCheckout);
Expand Down
4 changes: 2 additions & 2 deletions models/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ let Model = {
// undefined if value is from input, null if value is from origSettings
if (settingsSetInput.value !== undefined && settingsSetInput.value !== null && !validate(settingsSetInput.value)) {
let mErr = 'AJV Validation Error: Value does not match the schema, see logs for more info';
sails.log.error(mErr, validate.errors);
sails.log.error(mErr, JSON.stringify(validate.errors, null, 2));
throw mErr;
}
if (settingsSetInput.defaultValue !== undefined && settingsSetInput.defaultValue !== null && !validate(settingsSetInput.defaultValue)) {
let mErr = 'AJV Validation Error: DefaultValue does not match the schema, see logs for more info';
sails.log.error(mErr, validate.errors);
sails.log.error(mErr, JSON.stringify(validate.errors, null, 2));
throw mErr;
}
}
Expand Down

0 comments on commit 0b2aa9a

Please sign in to comment.