mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
chore: comment
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import { Router, Request, Response, NextFunction } from 'express';
|
||||
import { Service, Inject } from 'typedi';
|
||||
import { body } from 'express-validator';
|
||||
import asyncMiddleware from '@/api/middleware/asyncMiddleware';
|
||||
import BaseController from '@/api/controllers/BaseController';
|
||||
import { OneClickDemoApplication } from '@/services/OneClickDemo/OneClickDemoApplication';
|
||||
import { reset } from 'colorette';
|
||||
import { body } from 'express-validator';
|
||||
|
||||
@Service()
|
||||
export class OneClickDemoController extends BaseController {
|
||||
@@ -26,7 +25,6 @@ export class OneClickDemoController extends BaseController {
|
||||
this.validationResult,
|
||||
asyncMiddleware(this.oneClickSignIn.bind(this))
|
||||
);
|
||||
|
||||
return router;
|
||||
}
|
||||
|
||||
@@ -50,7 +48,7 @@ export class OneClickDemoController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Sign-in to one-click demo account.
|
||||
* @param {Request} req
|
||||
* @param {Response} res
|
||||
* @param {NextFunction} next
|
||||
|
||||
@@ -62,19 +62,23 @@ export class SeedInitialDemoAccountDataOnOrgBuild {
|
||||
.process(async (SeedDemoAccountSeeder) => {
|
||||
const seederInstance = new SeedDemoAccountSeeder();
|
||||
|
||||
// Initialize the seeder sheet file before importing.
|
||||
await this.initiateSeederFile(seederInstance.importFileName);
|
||||
|
||||
// Import the given seeder file.
|
||||
const importedFile = await this.importApp.import(
|
||||
tenantId,
|
||||
seederInstance.resource,
|
||||
seederInstance.importFileName,
|
||||
{}
|
||||
);
|
||||
// Mapping the columns with resource fields.
|
||||
await this.importApp.mapping(
|
||||
tenantId,
|
||||
importedFile.import.importId,
|
||||
seederInstance.mapping
|
||||
);
|
||||
// Commit the imported file.
|
||||
await this.importApp.process(tenantId, importedFile.import.importId);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user