deleted unnecessary imports/comments
MODIFY
src/server/rest/v1/service/RegistrationTokenService.ts
src/server/rest/v1/service/RegistrationTokenService.ts
@@ -16,7 +16,6 @@ import SiteAreaStorage from '../../../../storage/mongodb/SiteAreaStorage';
import TenantComponents from '../../../../types/TenantComponents';
import Utils from '../../../../utils/Utils';
import UtilsService from './UtilsService';
-import { filter } from 'bluebird';
import moment from 'moment';
const MODULE_NAME = 'RegistrationTokenService';

MODIFY
test/api/RegistrationTokenTest.ts
test/api/RegistrationTokenTest.ts
@@ -146,21 +146,7 @@ describe('Registration token tests', function() {
testData.tenantContext = await ContextProvider.defaultInstance.getTenantContext(ContextDefinition.TENANT_CONTEXTS.TENANT_WITH_ALL_COMPONENTS);
testData.basicUserContext = testData.tenantContext.getUserContext(ContextDefinition.USER_CONTEXTS.BASIC_USER);
testData.basicCentralService = new CentralServerService(ContextDefinition.TENANT_CONTEXTS.TENANT_WITH_ALL_COMPONENTS, testData.basicUserContext);
- // // Create the entity
- // testData.newSiteArea = await testData.userService.createEntity(
- // testData.userService.siteAreaApi,
- // Factory.siteArea.build({ siteID: testData.siteContext.getSite().id })
- // );
- // testData.userContext = testData.tenantContext.getUserContext(ContextDefinition.USER_CONTEXTS.BASIC_USER);
- // if (testData.userContext === testData.centralUserContext) {
- // // Reuse the central user service (to avoid double login)
- // testData.userService = testData.centralUserService;
- // } else {
- // testData.userService = new CentralServerService(
- // testData.tenantContext.getTenant().subdomain,
- // testData.userContext
- // );
- // }
+ // Create the entity
const registrationTokenToCreate = Factory.registrationToken.build();
testData.newRegistrationToken = await testData.adminCentralService.createEntity(
testData.adminCentralService.registrationApi,

MODIFY
test/factories/RegistrationTokenFactory.ts
test/factories/RegistrationTokenFactory.ts
import { Factory } from 'rosie';
-import faker from 'faker';
export default Factory.define('registrationToken')
.attr('description', () => 'Registration token for unit test')

deleted unnecessary imports/comments