Commit 5de0059eb765631e7ac4862fe4c19bb4de75b98c

Authored by YevhenBondarenko
1 parent a5e8cab5

apiUsageState improvements

@@ -86,13 +86,13 @@ public class ApiUsageStateServiceImpl extends AbstractEntityService implements A @@ -86,13 +86,13 @@ public class ApiUsageStateServiceImpl extends AbstractEntityService implements A
86 TenantProfile tenantProfile = tenantProfileDao.findById(tenantId, tenant.getTenantProfileId().getId()); 86 TenantProfile tenantProfile = tenantProfileDao.findById(tenantId, tenant.getTenantProfileId().getId());
87 TenantProfileConfiguration configuration = tenantProfile.getProfileData().getConfiguration(); 87 TenantProfileConfiguration configuration = tenantProfile.getProfileData().getConfiguration();
88 List<TsKvEntry> apiUsageStates = new ArrayList<>(); 88 List<TsKvEntry> apiUsageStates = new ArrayList<>();
89 - apiUsageStates.add(new BasicTsKvEntry(apiUsageState.getCreatedTime(), 89 + apiUsageStates.add(new BasicTsKvEntry(saved.getCreatedTime(),
90 new StringDataEntry(ApiFeature.TRANSPORT.getApiStateKey(), ApiUsageStateValue.ENABLED.name()))); 90 new StringDataEntry(ApiFeature.TRANSPORT.getApiStateKey(), ApiUsageStateValue.ENABLED.name())));
91 - apiUsageStates.add(new BasicTsKvEntry(apiUsageState.getCreatedTime(), 91 + apiUsageStates.add(new BasicTsKvEntry(saved.getCreatedTime(),
92 new StringDataEntry(ApiFeature.DB.getApiStateKey(), ApiUsageStateValue.ENABLED.name()))); 92 new StringDataEntry(ApiFeature.DB.getApiStateKey(), ApiUsageStateValue.ENABLED.name())));
93 - apiUsageStates.add(new BasicTsKvEntry(apiUsageState.getCreatedTime(), 93 + apiUsageStates.add(new BasicTsKvEntry(saved.getCreatedTime(),
94 new StringDataEntry(ApiFeature.RE.getApiStateKey(), ApiUsageStateValue.ENABLED.name()))); 94 new StringDataEntry(ApiFeature.RE.getApiStateKey(), ApiUsageStateValue.ENABLED.name())));
95 - apiUsageStates.add(new BasicTsKvEntry(apiUsageState.getCreatedTime(), 95 + apiUsageStates.add(new BasicTsKvEntry(saved.getCreatedTime(),
96 new StringDataEntry(ApiFeature.JS.getApiStateKey(), ApiUsageStateValue.ENABLED.name()))); 96 new StringDataEntry(ApiFeature.JS.getApiStateKey(), ApiUsageStateValue.ENABLED.name())));
97 tsService.save(tenantId, saved.getId(), apiUsageStates, 0L); 97 tsService.save(tenantId, saved.getId(), apiUsageStates, 0L);
98 98