payment-kit 1.13.78 → 1.13.79
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.
|
@@ -143,7 +143,7 @@ const paginationSchema = Joi.object<{
|
|
|
143
143
|
});
|
|
144
144
|
router.get('/', auth, async (req, res) => {
|
|
145
145
|
const { page, pageSize, ...query } = await paginationSchema.validateAsync(req.query, { stripUnknown: true });
|
|
146
|
-
const where: WhereOptions<PaymentLink> = {};
|
|
146
|
+
const where: WhereOptions<PaymentLink> = { 'metadata.preview': null };
|
|
147
147
|
|
|
148
148
|
if (typeof query.active === 'boolean') {
|
|
149
149
|
where.active = query.active;
|
|
@@ -3,7 +3,7 @@ import { Router } from 'express';
|
|
|
3
3
|
import Joi from 'joi';
|
|
4
4
|
import pick from 'lodash/pick';
|
|
5
5
|
import uniq from 'lodash/uniq';
|
|
6
|
-
import {
|
|
6
|
+
import type { WhereOptions } from 'sequelize';
|
|
7
7
|
|
|
8
8
|
import { checkPassportForPricingTable } from '../integrations/blocklet/passport';
|
|
9
9
|
import logger from '../libs/logger';
|
|
@@ -164,7 +164,7 @@ const paginationSchema = Joi.object<{
|
|
|
164
164
|
});
|
|
165
165
|
router.get('/', auth, async (req, res) => {
|
|
166
166
|
const { page, pageSize, ...query } = await paginationSchema.validateAsync(req.query, { stripUnknown: true });
|
|
167
|
-
const where: WhereOptions<PricingTable> = {
|
|
167
|
+
const where: WhereOptions<PricingTable> = { 'metadata.preview': null };
|
|
168
168
|
|
|
169
169
|
if (typeof query.active === 'boolean') {
|
|
170
170
|
where.active = query.active;
|
|
@@ -289,10 +289,11 @@ router.post('/stash', auth, async (req, res) => {
|
|
|
289
289
|
raw.locked = false;
|
|
290
290
|
raw.livemode = !!req.livemode;
|
|
291
291
|
raw.created_via = req.user?.via;
|
|
292
|
+
raw.metadata = { preview: '1' };
|
|
292
293
|
|
|
293
294
|
let doc = await PricingTable.findByPk(raw.id);
|
|
294
295
|
if (doc) {
|
|
295
|
-
await doc.update({ ...formatPricingTable(req.body), livemode: raw.livemode });
|
|
296
|
+
await doc.update({ ...formatPricingTable(req.body), metadata: raw.metadata, livemode: raw.livemode });
|
|
296
297
|
} else {
|
|
297
298
|
doc = await PricingTable.create(raw as PricingTable);
|
|
298
299
|
}
|
package/blocklet.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payment-kit",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.79",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "COMPONENT_STORE_URL=https://test.store.blocklet.dev blocklet dev",
|
|
6
6
|
"eject": "vite eject",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"@abtnode/types": "^1.16.20",
|
|
110
110
|
"@arcblock/eslint-config": "^0.2.4",
|
|
111
111
|
"@arcblock/eslint-config-ts": "^0.2.4",
|
|
112
|
-
"@did-pay/types": "1.13.
|
|
112
|
+
"@did-pay/types": "1.13.79",
|
|
113
113
|
"@types/cookie-parser": "^1.4.6",
|
|
114
114
|
"@types/cors": "^2.8.17",
|
|
115
115
|
"@types/dotenv-flow": "^3.3.3",
|
|
@@ -148,5 +148,5 @@
|
|
|
148
148
|
"parser": "typescript"
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
|
-
"gitHead": "
|
|
151
|
+
"gitHead": "2e35efe8ba1977c9547af7eeafeb29aeee257a90"
|
|
152
152
|
}
|