chore: remove unused apis
This commit is contained in:
parent
6b6a7a5cab
commit
60a8450d34
@ -12,10 +12,6 @@ export enum AppRoute {
|
||||
baseName = 'baseName',
|
||||
startServer = 'startServer',
|
||||
stopServer = 'stopServer',
|
||||
isCorsEnabled = 'isCorsEnabled',
|
||||
isVerboseEnabled = 'isVerboseEnabled',
|
||||
getHost = 'getHost',
|
||||
getPort = 'getPort',
|
||||
log = 'log'
|
||||
}
|
||||
|
||||
|
||||
@ -4,14 +4,7 @@ import { WindowManager } from './../managers/window'
|
||||
import { getResourcePath, userSpacePath } from './../utils/path'
|
||||
import { AppRoute } from '@janhq/core'
|
||||
import { ModuleManager, init, log } from '@janhq/core/node'
|
||||
import {
|
||||
startServer,
|
||||
stopServer,
|
||||
isCorsEnabled,
|
||||
isVerboseEnabled,
|
||||
getHost,
|
||||
getPort,
|
||||
} from '@janhq/server'
|
||||
import { startServer, stopServer } from '@janhq/server'
|
||||
|
||||
export function handleAppIPCs() {
|
||||
/**
|
||||
@ -78,26 +71,6 @@ export function handleAppIPCs() {
|
||||
*/
|
||||
ipcMain.handle(AppRoute.stopServer, stopServer)
|
||||
|
||||
/**
|
||||
* Check if CORS is enabled.
|
||||
*/
|
||||
ipcMain.handle(AppRoute.isCorsEnabled, isCorsEnabled)
|
||||
|
||||
/**
|
||||
* Check if verbose logging is enabled.
|
||||
*/
|
||||
ipcMain.handle(AppRoute.isVerboseEnabled, isVerboseEnabled)
|
||||
|
||||
/**
|
||||
* Get the host setting.
|
||||
*/
|
||||
ipcMain.handle(AppRoute.getHost, getHost)
|
||||
|
||||
/**
|
||||
* Get the port setting.
|
||||
*/
|
||||
ipcMain.handle(AppRoute.getPort, getPort)
|
||||
|
||||
/**
|
||||
* Relaunches the app in production - reload window in development.
|
||||
* @param _event - The IPC event object.
|
||||
|
||||
@ -133,27 +133,3 @@ export const stopServer = async () => {
|
||||
if (isVerbose) log(`[API]::Error: ${e}`);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Function to check if CORS is enabled
|
||||
* @returns - True if CORS is enabled, false otherwise
|
||||
*/
|
||||
export const isCorsEnabled = () => corsEnbaled;
|
||||
|
||||
/**
|
||||
* Function to check if verbose logging is enabled
|
||||
* @returns - True if verbose logging is enabled, false otherwise
|
||||
*/
|
||||
export const isVerboseEnabled = () => isVerbose;
|
||||
|
||||
/**
|
||||
* Function to get the host setting
|
||||
* @returns - The current host setting
|
||||
*/
|
||||
export const getHost = () => hostSetting;
|
||||
|
||||
/**
|
||||
* Function to get the port setting
|
||||
* @returns - The current port setting
|
||||
*/
|
||||
export const getPort = () => portSetting;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user