import { ipcMain } from 'electron'

import { getProfiles } from '../api'

import { Profile } from '../api/types'

ipcMain.handle('getProfiles', requestServerProfiles)

async function requestServerProfiles(): Promise<Profile[]> {
  return getProfiles()
}
