From 8f22bda8fd2e49317c03545fd6db8386cb7d026a Mon Sep 17 00:00:00 2001 From: Ayobami Akingbade Date: Mon, 11 Mar 2024 02:25:17 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(bootstrap):=20rem?= =?UTF-8?q?ove=20bootsrap=20calls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/configuration.service.ts | 7 +--- .../dashboard-widgets.service.ts | 7 +--- src/backend/data/data.service.ts | 2 +- src/backend/data/types.ts | 3 +- src/backend/entities/entities.service.ts | 8 +---- .../form-actions/form-actions.service.ts | 7 +--- .../services/_base.ts | 14 +------- .../integrations/integrations.service.ts | 8 +---- .../AbstractConfigDataPersistenceService.ts | 2 -- .../DatabaseConfigDataPersistenceAdaptor.ts | 4 --- .../JsonFileConfigDataPersistenceAdaptor.ts | 5 --- .../MemoryConfigDataPersistenceAdaptor.ts | 5 --- .../RedisConfigDataPersistenceAdaptor.ts | 4 --- src/backend/lib/config/config.service.ts | 6 +--- src/backend/lib/temp-storage/index.ts | 4 --- src/backend/list-order/list-order.service.ts | 7 +--- src/backend/menu/menu.service.ts | 10 +----- src/backend/roles/roles.service.ts | 7 +--- src/backend/schema/schema.service.ts | 6 ++-- src/backend/storage/storage.service.ts | 5 +-- src/backend/types.ts | 5 --- .../user-preferences.service.ts | 7 +--- src/backend/users/users.service.ts | 7 +--- src/pages/api/healthcheck/index.ts | 36 ++----------------- src/pages/api/healthcheck/portal/index.ts | 1 - src/pages/api/healthcheck/portal/main.ts | 1 - 26 files changed, 19 insertions(+), 159 deletions(-) delete mode 100644 src/backend/types.ts delete mode 100644 src/pages/api/healthcheck/portal/index.ts delete mode 100644 src/pages/api/healthcheck/portal/main.ts diff --git a/src/backend/configuration/configuration.service.ts b/src/backend/configuration/configuration.service.ts index ef4f628fe..5c2d6ab21 100644 --- a/src/backend/configuration/configuration.service.ts +++ b/src/backend/configuration/configuration.service.ts @@ -1,4 +1,3 @@ -import { IApplicationService } from "backend/types"; import { progammingError } from "backend/lib/errors"; import { AppConfigurationValueType } from "shared/configurations/constants"; import { @@ -12,15 +11,11 @@ import { AppConfigurationKeys, } from "../../shared/configurations"; -export class ConfigurationApiService implements IApplicationService { +export class ConfigurationApiService { constructor( private _appConfigPersistenceService: AbstractConfigDataPersistenceService ) {} - async bootstrap() { - await this._appConfigPersistenceService.setup(); - } - async show( key: T, entity?: string diff --git a/src/backend/dashboard-widgets/dashboard-widgets.service.ts b/src/backend/dashboard-widgets/dashboard-widgets.service.ts index 1f004dd77..57a1807de 100644 --- a/src/backend/dashboard-widgets/dashboard-widgets.service.ts +++ b/src/backend/dashboard-widgets/dashboard-widgets.service.ts @@ -6,7 +6,6 @@ import { createConfigDomainPersistenceService, AbstractConfigDataPersistenceService, } from "backend/lib/config-persistence"; -import { IApplicationService } from "backend/types"; import { HOME_DASHBOARD_KEY, IWidgetConfig, @@ -52,7 +51,7 @@ const runAsyncJavascriptString = async ( } }; -export class DashboardWidgetsApiService implements IApplicationService { +export class DashboardWidgetsApiService { constructor( private readonly _dashboardWidgetsPersistenceService: AbstractConfigDataPersistenceService, private readonly _entitiesApiService: EntitiesApiService, @@ -61,10 +60,6 @@ export class DashboardWidgetsApiService implements IApplicationService { private readonly _rDBMSApiDataService: RDBMSDataApiService ) {} - async bootstrap() { - await this._dashboardWidgetsPersistenceService.setup(); - } - async runScript( script$1: string, currentUser: IAccountProfile, diff --git a/src/backend/data/data.service.ts b/src/backend/data/data.service.ts index ca3499007..d6d39ef5c 100644 --- a/src/backend/data/data.service.ts +++ b/src/backend/data/data.service.ts @@ -33,7 +33,7 @@ export class DataApiService implements IDataApiService { private _configurationApiService: ConfigurationApiService ) {} - async bootstrap() { + async runOnLoad() { await this.getDataAccessInstance().bootstrap(); } diff --git a/src/backend/data/types.ts b/src/backend/data/types.ts index ebdb6588e..76eebb352 100644 --- a/src/backend/data/types.ts +++ b/src/backend/data/types.ts @@ -1,4 +1,3 @@ -import { IApplicationService } from "backend/types"; import { PaginatedData, QueryFilterSchema } from "shared/types/data"; import { IAccountProfile } from "shared/types/user"; @@ -11,7 +10,7 @@ export interface IPaginationFilters { export const FOR_CODE_COV = 1; -export interface IDataApiService extends IApplicationService { +export interface IDataApiService { fetchData( entity: string, select: string[], diff --git a/src/backend/entities/entities.service.ts b/src/backend/entities/entities.service.ts index 7ca4a6fdf..b341158dc 100644 --- a/src/backend/entities/entities.service.ts +++ b/src/backend/entities/entities.service.ts @@ -4,8 +4,6 @@ import { ConfigurationApiService, } from "backend/configuration/configuration.service"; import { rolesApiService, RolesApiService } from "backend/roles/roles.service"; -import { IApplicationService } from "backend/types"; -import { noop } from "shared/lib/noop"; import { IDBSchema, IEntityField, IEntityRelation } from "shared/types/db"; import { DataCrudKeys } from "shared/types/data"; import { CRUD_HIDDEN_KEY_CONFIG } from "shared/configurations/permissions"; @@ -13,17 +11,13 @@ import { sortListByOrder } from "shared/lib/array/sort"; import { SchemasApiService, schemasApiService } from "../schema/schema.service"; import { PortalFieldsFilterService } from "./portal"; -export class EntitiesApiService implements IApplicationService { +export class EntitiesApiService { constructor( private _schemasApiService: SchemasApiService, private _configurationApiService: ConfigurationApiService, private _rolesApiService: RolesApiService ) {} - async bootstrap() { - noop(); - } - private async getDBSchemaModels(): Promise> { return Object.fromEntries( (await this._schemasApiService.getDBSchema()).map((model) => [ diff --git a/src/backend/form-actions/form-actions.service.ts b/src/backend/form-actions/form-actions.service.ts index 58fefb1db..cab7a1163 100644 --- a/src/backend/form-actions/form-actions.service.ts +++ b/src/backend/form-actions/form-actions.service.ts @@ -2,19 +2,14 @@ import { createConfigDomainPersistenceService, AbstractConfigDataPersistenceService, } from "backend/lib/config-persistence"; -import { IApplicationService } from "backend/types"; import { nanoid } from "nanoid"; import { IFormAction } from "shared/types/actions"; -export class FormActionsApiService implements IApplicationService { +export class FormActionsApiService { constructor( private readonly _formActionsPersistenceService: AbstractConfigDataPersistenceService ) {} - async bootstrap() { - await this._formActionsPersistenceService.setup(); - } - async createFormAction(action: Omit) { const id = nanoid(); diff --git a/src/backend/integrations-configurations/services/_base.ts b/src/backend/integrations-configurations/services/_base.ts index 8ee6cd82c..3530f0905 100644 --- a/src/backend/integrations-configurations/services/_base.ts +++ b/src/backend/integrations-configurations/services/_base.ts @@ -1,15 +1,11 @@ import { AbstractConfigDataPersistenceService } from "backend/lib/config-persistence"; import { EncryptionApiService } from "backend/lib/encryption/encryption.service"; import { BadRequestError, progammingError } from "backend/lib/errors"; -import { IApplicationService } from "backend/types"; -import { noop } from "shared/lib/noop"; import { IGroupCredential } from "../types"; export const INTEGRATION_CONFIG_GROUP_DEMILITER = "___"; -export abstract class IntegrationsConfigurationApiService - implements IApplicationService -{ +export abstract class IntegrationsConfigurationApiService { constructor( protected _persistenceService: AbstractConfigDataPersistenceService, protected _encryptionApiService: EncryptionApiService @@ -17,14 +13,6 @@ export abstract class IntegrationsConfigurationApiService static GROUP_DEMILITER = INTEGRATION_CONFIG_GROUP_DEMILITER; - async bootstrap() { - try { - await this._persistenceService.setup(); - } catch (error) { - noop(); - } - } - async hasKey(key: string): Promise { return (await this.getValue(key)) !== undefined; } diff --git a/src/backend/integrations/integrations.service.ts b/src/backend/integrations/integrations.service.ts index 82db59788..c18cbcba7 100644 --- a/src/backend/integrations/integrations.service.ts +++ b/src/backend/integrations/integrations.service.ts @@ -13,15 +13,13 @@ import { createKeyValueDomainPersistenceService, KeyValueStoreApiService, } from "backend/lib/key-value"; -import { IApplicationService } from "backend/types"; -import { noop } from "shared/lib/noop"; import { formActionsApiService, FormActionsApiService, } from "backend/form-actions/form-actions.service"; import { ACTION_INTEGRATIONS } from "./libs"; -export class IntegrationsApiService implements IApplicationService { +export class IntegrationsApiService { constructor( private readonly _activatedIntegrationsPersistenceService: KeyValueStoreApiService< ActionIntegrations[] @@ -30,10 +28,6 @@ export class IntegrationsApiService implements IApplicationService { private readonly _formActionsApiService: FormActionsApiService ) {} - async bootstrap() { - noop(); - } - listActionIntegrations(): IIntegrationsList[] { return Object.entries(ACTION_INTEGRATIONS).map( ([key, { title, description, configurationSchema }]) => ({ diff --git a/src/backend/lib/config-persistence/AbstractConfigDataPersistenceService.ts b/src/backend/lib/config-persistence/AbstractConfigDataPersistenceService.ts index 53f58d3cc..1671c382b 100644 --- a/src/backend/lib/config-persistence/AbstractConfigDataPersistenceService.ts +++ b/src/backend/lib/config-persistence/AbstractConfigDataPersistenceService.ts @@ -10,8 +10,6 @@ export abstract class AbstractConfigDataPersistenceService { protected readonly _configApiService!: ConfigApiService; - public abstract setup(): Promise; - constructor(configDomain: ConfigDomain, configApiService: ConfigApiService) { this._configDomain = configDomain; this._configApiService = configApiService; diff --git a/src/backend/lib/config-persistence/DatabaseConfigDataPersistenceAdaptor.ts b/src/backend/lib/config-persistence/DatabaseConfigDataPersistenceAdaptor.ts index 5ed98a7cc..636cf1be4 100644 --- a/src/backend/lib/config-persistence/DatabaseConfigDataPersistenceAdaptor.ts +++ b/src/backend/lib/config-persistence/DatabaseConfigDataPersistenceAdaptor.ts @@ -57,10 +57,6 @@ export class DatabaseConfigDataPersistenceAdaptor< return DatabaseConfigDataPersistenceAdaptor._dbInstance; } - async setup() { - await this.getDbInstance(); - } - async _resetToEmpty() { await (await this.getDbInstance())(CONFIG_TABLE_NAME) .where("domain", "=", this._configDomain) diff --git a/src/backend/lib/config-persistence/JsonFileConfigDataPersistenceAdaptor.ts b/src/backend/lib/config-persistence/JsonFileConfigDataPersistenceAdaptor.ts index a4573d80e..b5bfb82fb 100644 --- a/src/backend/lib/config-persistence/JsonFileConfigDataPersistenceAdaptor.ts +++ b/src/backend/lib/config-persistence/JsonFileConfigDataPersistenceAdaptor.ts @@ -1,5 +1,4 @@ import fs from "fs-extra"; -import { noop } from "shared/lib/noop"; import path from "path"; import { ConfigApiService } from "../config/config.service"; @@ -13,10 +12,6 @@ export class JsonFileConfigDataPersistenceAdaptor< super(configDomain, configApiService); } - async setup() { - noop(); - } - private pathToConfigDomain = (type: ConfigDomain) => { const file = this._configApiService.getNodeEnvironment() === "test" diff --git a/src/backend/lib/config-persistence/MemoryConfigDataPersistenceAdaptor.ts b/src/backend/lib/config-persistence/MemoryConfigDataPersistenceAdaptor.ts index 40f7141bf..1debd662c 100644 --- a/src/backend/lib/config-persistence/MemoryConfigDataPersistenceAdaptor.ts +++ b/src/backend/lib/config-persistence/MemoryConfigDataPersistenceAdaptor.ts @@ -1,4 +1,3 @@ -import { noop } from "shared/lib/noop"; import { ConfigApiService } from "../config/config.service"; import { AbstractConfigDataPersistenceService } from "./AbstractConfigDataPersistenceService"; import { ConfigDomain } from "./types"; @@ -12,10 +11,6 @@ export class MemoryConfigDataPersistenceAdaptor< super(configDomain, configApiService); } - async setup() { - noop(); - } - getItemLastUpdated() { return null; } diff --git a/src/backend/lib/config-persistence/RedisConfigDataPersistenceAdaptor.ts b/src/backend/lib/config-persistence/RedisConfigDataPersistenceAdaptor.ts index 2c978d51b..8c4b189e7 100644 --- a/src/backend/lib/config-persistence/RedisConfigDataPersistenceAdaptor.ts +++ b/src/backend/lib/config-persistence/RedisConfigDataPersistenceAdaptor.ts @@ -32,10 +32,6 @@ export class RedisConfigDataPersistenceAdaptor< return null; } - async setup() { - await this.getRedisInstance(); - } - constructor(configDomain: ConfigDomain, _configApiService: ConfigApiService) { super(configDomain, _configApiService); } diff --git a/src/backend/lib/config/config.service.ts b/src/backend/lib/config/config.service.ts index b81f3646a..ec165eeb0 100644 --- a/src/backend/lib/config/config.service.ts +++ b/src/backend/lib/config/config.service.ts @@ -16,14 +16,10 @@ export class ConfigApiService { constructor(protected processEnv: Record) { if (!this.processEnv.DO_NOT_BOOSTRAP_CONFIG) { - this.bootstrap(); + this.assertConfiguration(); } } - bootstrap() { - this.assertConfiguration(); - } - getConfigValue(key: ConfigKeys): T { return this.processEnv[key] as unknown as T; } diff --git a/src/backend/lib/temp-storage/index.ts b/src/backend/lib/temp-storage/index.ts index f37bc3c55..e427dbb29 100644 --- a/src/backend/lib/temp-storage/index.ts +++ b/src/backend/lib/temp-storage/index.ts @@ -14,10 +14,6 @@ export class TempStorageApiService { private readonly _tempStoragePersistenceService: AbstractConfigDataPersistenceService ) {} - async bootstrap() { - await this._tempStoragePersistenceService.setup(); - } - async clearItem(key: string) { await this._tempStoragePersistenceService.removeItem(key); } diff --git a/src/backend/list-order/list-order.service.ts b/src/backend/list-order/list-order.service.ts index 06b03c71f..b28e5f739 100644 --- a/src/backend/list-order/list-order.service.ts +++ b/src/backend/list-order/list-order.service.ts @@ -2,19 +2,14 @@ import { createConfigDomainPersistenceService, AbstractConfigDataPersistenceService, } from "backend/lib/config-persistence"; -import { IApplicationService } from "backend/types"; -export class ListOrderApiService implements IApplicationService { +export class ListOrderApiService { constructor( private readonly _listOrderPersistenceService: AbstractConfigDataPersistenceService< string[] > ) {} - async bootstrap() { - await this._listOrderPersistenceService.setup(); - } - async getItemOrder(listId: string): Promise { return await this._listOrderPersistenceService.getItem(listId, []); } diff --git a/src/backend/menu/menu.service.ts b/src/backend/menu/menu.service.ts index ab812fbe4..22e26e7c7 100644 --- a/src/backend/menu/menu.service.ts +++ b/src/backend/menu/menu.service.ts @@ -1,4 +1,3 @@ -import { IApplicationService } from "backend/types"; import { nanoid } from "nanoid"; import { INavigationMenuItem, @@ -12,7 +11,6 @@ import { EntitiesApiService, entitiesApiService, } from "backend/entities/entities.service"; -import { noop } from "shared/lib/noop"; import { ConfigurationApiService, configurationApiService, @@ -46,19 +44,13 @@ const SYSTEM_LINKS_CONFIG_MAP: Record< }, }; -export class NavigationMenuApiService - implements IApplicationService, IBaseNavigationMenuApiService -{ +export class NavigationMenuApiService implements IBaseNavigationMenuApiService { constructor( private readonly _entitiesApiService: EntitiesApiService, private readonly _configurationApiService: ConfigurationApiService, private readonly _rolesApiService: RolesApiService ) {} - async bootstrap() { - noop(); - } - async getMenuItems(userRole: string) { const portalMenuItems = await getPortalMenuItems(userRole, this); diff --git a/src/backend/roles/roles.service.ts b/src/backend/roles/roles.service.ts index 36eaa9310..cb1176ba4 100644 --- a/src/backend/roles/roles.service.ts +++ b/src/backend/roles/roles.service.ts @@ -3,7 +3,6 @@ import { AbstractConfigDataPersistenceService, } from "backend/lib/config-persistence"; import { BadRequestError } from "backend/lib/errors"; -import { IApplicationService } from "backend/types"; import { canRoleDoThisAsync } from "shared/logic/permissions"; import { isSystemRole, @@ -18,15 +17,11 @@ export interface IRole { permissions: string[]; } -export class RolesApiService implements IApplicationService { +export class RolesApiService { constructor( private readonly _rolesPersistenceService: AbstractConfigDataPersistenceService ) {} - async bootstrap() { - await this._rolesPersistenceService.setup(); - } - async listRoles(): Promise { const roles = await this._rolesPersistenceService.getAllItems(); diff --git a/src/backend/schema/schema.service.ts b/src/backend/schema/schema.service.ts index 137132cf6..a4e27b16e 100644 --- a/src/backend/schema/schema.service.ts +++ b/src/backend/schema/schema.service.ts @@ -3,7 +3,6 @@ import { CredentialsApiService, credentialsApiService, } from "backend/integrations-configurations"; -import { IApplicationService } from "backend/types"; import { IDBSchema, IEntityField } from "shared/types/db"; import { IDataSourceCredentials } from "shared/types/data-sources"; import { DATABASE_CREDENTIAL_GROUP } from "backend/data/fields"; @@ -13,7 +12,7 @@ import { AbstractConfigDataPersistenceService, } from "../lib/config-persistence"; -export class SchemasApiService implements IApplicationService { +export class SchemasApiService { private dbSchema: IDBSchema[]; constructor( @@ -21,8 +20,7 @@ export class SchemasApiService implements IApplicationService { private _credentialsService: CredentialsApiService ) {} - async bootstrap() { - await this._schemaConfigDataPersistenceService.setup(); + async runOnLoad() { await this.loadDbSchema(); } diff --git a/src/backend/storage/storage.service.ts b/src/backend/storage/storage.service.ts index 5d4213327..6735a3453 100644 --- a/src/backend/storage/storage.service.ts +++ b/src/backend/storage/storage.service.ts @@ -7,20 +7,17 @@ import { createKeyValueDomainPersistenceService, KeyValueStoreApiService, } from "backend/lib/key-value"; -import { IApplicationService } from "backend/types"; import { sluggify } from "shared/lib/strings"; import { IStorageIntegration } from "shared/types/actions"; import { STORAGE_INTEGRATIONS } from "./integrations"; import { StorageIntegrations } from "./integrations/types"; -export class StorageApiService implements IApplicationService { +export class StorageApiService { constructor( private readonly _currentStorageKeyValueStoreApiService: KeyValueStoreApiService, private readonly _credentialsApiService: CredentialsApiService ) {} - async bootstrap() {} - listStorageIntegrations(): IStorageIntegration[] { return Object.entries(STORAGE_INTEGRATIONS).map( ([key, { title, integrationConfigurationSchema }]) => ({ diff --git a/src/backend/types.ts b/src/backend/types.ts deleted file mode 100644 index 41a6a9a52..000000000 --- a/src/backend/types.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IApplicationService { - bootstrap: () => Promise; -} - -export const FOR_CODE_COV = 1; diff --git a/src/backend/user-preferences/user-preferences.service.ts b/src/backend/user-preferences/user-preferences.service.ts index 2d95bcba1..bc654e8b0 100644 --- a/src/backend/user-preferences/user-preferences.service.ts +++ b/src/backend/user-preferences/user-preferences.service.ts @@ -1,4 +1,3 @@ -import { IApplicationService } from "backend/types"; import { USER_PREFERENCES_CONFIG, UserPreferencesKeys, @@ -9,15 +8,11 @@ import { AbstractConfigDataPersistenceService, } from "../lib/config-persistence"; -export class UserPreferencesApiService implements IApplicationService { +export class UserPreferencesApiService { constructor( private _userPreferencesPersistenceService: AbstractConfigDataPersistenceService ) {} - async bootstrap() { - await this._userPreferencesPersistenceService.setup(); - } - private makeId({ key, username, diff --git a/src/backend/users/users.service.ts b/src/backend/users/users.service.ts index da1800ada..c61a6bb39 100644 --- a/src/backend/users/users.service.ts +++ b/src/backend/users/users.service.ts @@ -1,7 +1,6 @@ import { AbstractConfigDataPersistenceService } from "backend/lib/config-persistence"; import { BadRequestError, UnauthorizedError } from "backend/lib/errors"; import { HashService } from "backend/lib/hash/hash.service"; -import { IApplicationService } from "backend/types"; import { IAccountUser, IAccountProfile } from "shared/types/user"; import { ISuccessfullAuthenticationResponse } from "shared/types/auth/portal"; import { noop } from "shared/lib/noop"; @@ -20,7 +19,7 @@ import { usersPersistenceService } from "./shared"; const INVALID_LOGIN_MESSAGE = "Invalid Login"; -export class UsersApiService implements IApplicationService { +export class UsersApiService { constructor( private readonly _usersPersistenceService: AbstractConfigDataPersistenceService, private readonly _configurationApiService: ConfigurationApiService, @@ -42,10 +41,6 @@ export class UsersApiService implements IApplicationService { } } - async bootstrap() { - await this._usersPersistenceService.setup(); - } - async registerUser(user: IAccountUser) { if (await this._usersPersistenceService.hasItem(user.username)) { throw new BadRequestError("Username already exists"); diff --git a/src/pages/api/healthcheck/index.ts b/src/pages/api/healthcheck/index.ts index 9de04c299..8140cde03 100644 --- a/src/pages/api/healthcheck/index.ts +++ b/src/pages/api/healthcheck/index.ts @@ -1,46 +1,14 @@ import { noop } from "shared/lib/noop"; import { requestHandler } from "backend/lib/request"; -import { configurationApiService } from "backend/configuration/configuration.service"; -import { - credentialsApiService, - environmentVariablesApiService, - appConstantsApiService, -} from "backend/integrations-configurations"; import { dataApiService } from "backend/data/data.service"; -import { entitiesApiService } from "backend/entities/entities.service"; -import { configApiService } from "backend/lib/config/config.service"; -import { rolesApiService } from "backend/roles/roles.service"; import { schemasApiService } from "backend/schema/schema.service"; -import { usersApiService } from "backend/users/users.service"; -import { storageApiService } from "backend/storage/storage.service"; -import { formActionsApiService } from "backend/form-actions/form-actions.service"; -import { dashboardWidgetsApiService } from "backend/dashboard-widgets/dashboard-widgets.service"; -import { listOrderApiService } from "backend/list-order/list-order.service"; -import { tempStorageApiService } from "backend/lib/temp-storage"; -import { userPreferencesApiService } from "backend/user-preferences/user-preferences.service"; -import { bootstrapPortalServices } from "./portal"; export default requestHandler( { GET: async () => { try { - configApiService.bootstrap(); - await credentialsApiService.bootstrap(); - await configurationApiService.bootstrap(); - await environmentVariablesApiService.bootstrap(); - await appConstantsApiService.bootstrap(); - await rolesApiService.bootstrap(); - await dataApiService.bootstrap(); - await schemasApiService.bootstrap(); - await usersApiService.bootstrap(); - await entitiesApiService.bootstrap(); - await formActionsApiService.bootstrap(); - await dashboardWidgetsApiService.bootstrap(); - await storageApiService.bootstrap(); - await listOrderApiService.bootstrap(); - await userPreferencesApiService.bootstrap(); - await bootstrapPortalServices(); - await tempStorageApiService.bootstrap(); + await dataApiService.runOnLoad(); + await schemasApiService.runOnLoad(); } catch (error) { noop(); } diff --git a/src/pages/api/healthcheck/portal/index.ts b/src/pages/api/healthcheck/portal/index.ts deleted file mode 100644 index e7a8e382c..000000000 --- a/src/pages/api/healthcheck/portal/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { bootstrapPortalServices } from "./main"; diff --git a/src/pages/api/healthcheck/portal/main.ts b/src/pages/api/healthcheck/portal/main.ts deleted file mode 100644 index 45382cdeb..000000000 --- a/src/pages/api/healthcheck/portal/main.ts +++ /dev/null @@ -1 +0,0 @@ -export const bootstrapPortalServices = async () => {};