chore: remove unused tauri cmd get_server_token (#787)

Found this tauri command while reading the code, then I realized that
token management logic should all be kept in the backend, there is no
need to expose it to the frontend. And indeed, searching for it in the
frontend code showed that it is not used at all.

```sh
$ cd src

$ rg get_server_token
commands/servers.ts
75:export function get_server_token(id: string): Promise<ServerTokenResponse> {
76:  return invokeWithErrorHandler(`get_server_token`, { id });
```

So remove it.
This commit is contained in:
SteveLauC
2025-07-20 17:25:32 +08:00
committed by GitHub
parent db5c09f80c
commit 57ab08fb6d
2 changed files with 0 additions and 5 deletions

View File

@@ -107,7 +107,6 @@ pub fn run() {
show_settings,
show_check,
hide_check,
server::servers::get_server_token,
server::servers::add_coco_server,
server::servers::remove_coco_server,
server::servers::list_coco_servers,

View File

@@ -72,10 +72,6 @@ async function invokeWithErrorHandler<T>(
}
}
export function get_server_token(id: string): Promise<ServerTokenResponse> {
return invokeWithErrorHandler(`get_server_token`, { id });
}
export function list_coco_servers(): Promise<Server[]> {
return invokeWithErrorHandler(`list_coco_servers`);
}