mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: ensure organization tenant configured.
This commit is contained in:
@@ -8,6 +8,8 @@ import AttachCurrentTenantUser from 'api/middleware/AttachCurrentTenantUser';
|
||||
import OrganizationService from 'services/Organization';
|
||||
import { ServiceError } from 'exceptions';
|
||||
import BaseController from 'api/controllers/BaseController';
|
||||
import EnsureConfiguredMiddleware from 'api/middleware/EnsureConfiguredMiddleware';
|
||||
import SettingsMiddleware from 'api/middleware/SettingsMiddleware';
|
||||
|
||||
@Service()
|
||||
export default class OrganizationController extends BaseController{
|
||||
@@ -27,6 +29,10 @@ export default class OrganizationController extends BaseController{
|
||||
router.use(TenancyMiddleware);
|
||||
router.use(SubscriptionMiddleware('main'));
|
||||
|
||||
// Should to seed organization tenant be configured.
|
||||
router.use('/seed', SettingsMiddleware);
|
||||
router.use('/seed', EnsureConfiguredMiddleware);
|
||||
|
||||
router.post(
|
||||
'/build',
|
||||
asyncMiddleware(this.build.bind(this))
|
||||
|
||||
Reference in New Issue
Block a user