AdminController interface represents the structure of the admin controller.

This interface provides the following methods:

getServerSettings - Fetches the server settings from the database.

updateServerSettings - Updates the server settings in the database.

interface AdminController {
    getServerSettings: () => Promise<any>;
    updateServerSettings: (
        speedofhash: any,
        leewayspeed: any,
        timeouttime: any,
        attendancethreshold: any,
    ) => Promise<any>;
}

Properties

getServerSettings: () => Promise<any>

Gets the server settings.

This method fetches the server settings from the database using the ServerSettingsModel.

Type declaration

    • (): Promise<any>
    • Returns Promise<any>

      A promise that resolves to the server settings.

updateServerSettings: (
    speedofhash: any,
    leewayspeed: any,
    timeouttime: any,
    attendancethreshold: any,
) => Promise<any>

Updates the server settings.

This method updates the server settings in the database using the ServerSettingsModel.

Type declaration

    • (
          speedofhash: any,
          leewayspeed: any,
          timeouttime: any,
          attendancethreshold: any,
      ): Promise<any>
    • Parameters

      • speedofhash: any

        The speed of hash.

      • leewayspeed: any

        The leeway speed.

      • timeouttime: any

        The timeout time.

      • attendancethreshold: any

        The attendance threshold.

      Returns Promise<any>

      A promise that resolves when the server settings have been updated.