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 });
|
startWakeword({ onWake: showHud });
|
||||||
|
|
||||||
ipcMain.on('hide-hud', () => hideHud());
|
ipcMain.on('hide-hud', hideHud);
|
||||||
|
|
||||||
ipcMain.on('send-message', async (_, text) => {
|
ipcMain.on('send-message', (_, text) => {
|
||||||
try {
|
axios.post(`${FOX_URL}/fox/message`, { text })
|
||||||
await axios.post(`${FOX_URL}/fox/message`, { text });
|
.catch(err => console.error('[Fox] send-message fehlgeschlagen:', err.message));
|
||||||
} catch (err) {
|
|
||||||
console.error('[Fox] send-message fehlgeschlagen:', err.message);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.handle('mac-command', async (_, command) => {
|
ipcMain.handle('mac-command', async (_, command) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue