Skip to content

Commit f64c3d9

Browse files
Merge pull request #632 from codex-team/master
Update prod
2 parents 46349e1 + c4d0111 commit f64c3d9

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hawk.api",
3-
"version": "1.4.7",
3+
"version": "1.4.9",
44
"main": "index.ts",
55
"license": "BUSL-1.1",
66
"scripts": {

src/resolvers/billingNew.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export default {
8686
currency: string;
8787
checksum: string;
8888
nextPaymentDate: Date;
89+
cloudPaymentsPublicId: string;
8990
}> {
9091
const { workspaceId, tariffPlanId, shouldSaveCard } = input;
9192

@@ -178,6 +179,7 @@ debug: ${Boolean(workspace.isDebug)}`
178179
currency: 'RUB',
179180
checksum,
180181
nextPaymentDate,
182+
cloudPaymentsPublicId: process.env.CLOUDPAYMENTS_PUBLIC_ID || '',
181183
};
182184
},
183185
},

src/resolvers/workspace.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,8 @@ module.exports = {
436436

437437
const defaultPlan = await factories.plansFactory.getDefaultPlan();
438438

439-
if (workspaceModel.tariffPlanId === defaultPlan.id) {
439+
// Prevent re-applying the free plan if workspace is already on it.
440+
if (workspaceModel.tariffPlanId.toString() === defaultPlan._id.toString()) {
440441
throw new UserInputError('You already use default plan');
441442
}
442443

src/typeDefs/billing.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,11 @@ type ComposePaymentResponse {
270270
Next payment date (recurrent start)
271271
"""
272272
nextPaymentDate: DateTime!
273+
274+
"""
275+
CloudPayments public id (merchant identifier for payment widget)
276+
"""
277+
cloudPaymentsPublicId: String!
273278
}
274279
275280

0 commit comments

Comments
 (0)