mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-22 01:19:13 +01:00
Websocket Support (#159)
This commit is contained in:
14
src-web/commands/deleteWebsocketConnection.ts
Normal file
14
src-web/commands/deleteWebsocketConnection.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import type { WebsocketConnection } from '@yaakapp-internal/models';
|
||||
import { deleteWebsocketConnection as cmdDeleteWebsocketConnection } from '@yaakapp-internal/ws';
|
||||
import { createFastMutation } from '../hooks/useFastMutation';
|
||||
import { trackEvent } from '../lib/analytics';
|
||||
|
||||
export const deleteWebsocketConnection = createFastMutation({
|
||||
mutationKey: ['delete_websocket_connection'],
|
||||
mutationFn: async function (connection: WebsocketConnection) {
|
||||
return cmdDeleteWebsocketConnection(connection.id);
|
||||
},
|
||||
onSuccess: async () => {
|
||||
trackEvent('websocket_connection', 'delete');
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user