fix: use .catch() in send-message IPC handler, remove redundant lambda
parent
c2479dc7ad
commit
82ca58738c
|
|
@ -28,14 +28,11 @@ app.whenReady().then(() => {
|
|||
|
||||
startWakeword({ onWake: showHud });
|
||||
|
||||
ipcMain.on('hide-hud', () => hideHud());
|
||||
ipcMain.on('hide-hud', hideHud);
|
||||
|
||||
ipcMain.on('send-message', async (_, text) => {
|
||||
try {
|
||||
await axios.post(`${FOX_URL}/fox/message`, { text });
|
||||
} catch (err) {
|
||||
console.error('[Fox] send-message fehlgeschlagen:', err.message);
|
||||
}
|
||||
ipcMain.on('send-message', (_, text) => {
|
||||
axios.post(`${FOX_URL}/fox/message`, { text })
|
||||
.catch(err => console.error('[Fox] send-message fehlgeschlagen:', err.message));
|
||||
});
|
||||
|
||||
ipcMain.handle('mac-command', async (_, command) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue