diff options
author | 2019-04-30 15:23:38 +0200 | |
---|---|---|
committer | 2019-04-30 15:23:38 +0200 | |
commit | 1bae1dfcbc4a5f590c51103635006198ae6a91d6 (patch) | |
tree | c838e9e7e18342c01e3c3b46c8e9ca4b74895e3b /src/stores/ServicesStore.js | |
parent | Update CHANGELOG.md (diff) | |
download | ferdium-app-1bae1dfcbc4a5f590c51103635006198ae6a91d6.tar.gz ferdium-app-1bae1dfcbc4a5f590c51103635006198ae6a91d6.tar.zst ferdium-app-1bae1dfcbc4a5f590c51103635006198ae6a91d6.zip |
Enforce service limit
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 13f929c2f..349de2c9b 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -13,6 +13,7 @@ import CachedRequest from './lib/CachedRequest'; | |||
13 | import { matchRoute } from '../helpers/routing-helpers'; | 13 | import { matchRoute } from '../helpers/routing-helpers'; |
14 | import { gaEvent, statsEvent } from '../lib/analytics'; | 14 | import { gaEvent, statsEvent } from '../lib/analytics'; |
15 | import { workspaceStore } from '../features/workspaces'; | 15 | import { workspaceStore } from '../features/workspaces'; |
16 | import { serviceLimitStore } from '../features/serviceLimit'; | ||
16 | 17 | ||
17 | const debug = require('debug')('Franz:ServiceStore'); | 18 | const debug = require('debug')('Franz:ServiceStore'); |
18 | 19 | ||
@@ -164,6 +165,8 @@ export default class ServicesStore extends Store { | |||
164 | 165 | ||
165 | // Actions | 166 | // Actions |
166 | @action async _createService({ recipeId, serviceData, redirect = true }) { | 167 | @action async _createService({ recipeId, serviceData, redirect = true }) { |
168 | if (serviceLimitStore.userHasReachedServiceLimit) return; | ||
169 | |||
167 | const data = this._cleanUpTeamIdAndCustomUrl(recipeId, serviceData); | 170 | const data = this._cleanUpTeamIdAndCustomUrl(recipeId, serviceData); |
168 | 171 | ||
169 | const response = await this.createServiceRequest.execute(recipeId, data)._promise; | 172 | const response = await this.createServiceRequest.execute(recipeId, data)._promise; |