mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-21 16:21:25 +02:00
More cleanup
This commit is contained in:
@@ -1724,7 +1724,6 @@ pub fn run() {
|
|||||||
plugins_ext::cmd_plugins_update_all,
|
plugins_ext::cmd_plugins_update_all,
|
||||||
//
|
//
|
||||||
// WebSocket commands
|
// WebSocket commands
|
||||||
ws_ext::cmd_ws_delete_connection,
|
|
||||||
ws_ext::cmd_ws_delete_connections,
|
ws_ext::cmd_ws_delete_connections,
|
||||||
ws_ext::cmd_ws_send,
|
ws_ext::cmd_ws_send,
|
||||||
ws_ext::cmd_ws_close,
|
ws_ext::cmd_ws_close,
|
||||||
|
|||||||
@@ -28,18 +28,6 @@ use yaak_templates::{RenderErrorBehavior, RenderOptions};
|
|||||||
use yaak_tls::find_client_certificate;
|
use yaak_tls::find_client_certificate;
|
||||||
use yaak_ws::{WebsocketManager, render_websocket_request};
|
use yaak_ws::{WebsocketManager, render_websocket_request};
|
||||||
|
|
||||||
#[command]
|
|
||||||
pub async fn cmd_ws_delete_connection<R: Runtime>(
|
|
||||||
connection_id: &str,
|
|
||||||
app_handle: AppHandle<R>,
|
|
||||||
window: WebviewWindow<R>,
|
|
||||||
) -> Result<WebsocketConnection> {
|
|
||||||
Ok(app_handle.db().delete_websocket_connection_by_id(
|
|
||||||
connection_id,
|
|
||||||
&UpdateSource::from_window_label(window.label()),
|
|
||||||
)?)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[command]
|
#[command]
|
||||||
pub async fn cmd_ws_delete_connections<R: Runtime>(
|
pub async fn cmd_ws_delete_connections<R: Runtime>(
|
||||||
request_id: &str,
|
request_id: &str,
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
import { invoke } from '@tauri-apps/api/core';
|
import { invoke } from '@tauri-apps/api/core';
|
||||||
import { WebsocketConnection } from '@yaakapp-internal/models';
|
import { WebsocketConnection } from '@yaakapp-internal/models';
|
||||||
|
|
||||||
export function deleteWebsocketConnection(connectionId: string) {
|
|
||||||
return invoke('cmd_ws_delete_connection', {
|
|
||||||
connectionId,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function deleteWebsocketConnections(requestId: string) {
|
export function deleteWebsocketConnections(requestId: string) {
|
||||||
return invoke('cmd_ws_delete_connections', {
|
return invoke('cmd_ws_delete_connections', {
|
||||||
requestId,
|
requestId,
|
||||||
|
|||||||
Reference in New Issue
Block a user