mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-12 18:53:48 +00:00
Required the API token for every runtime API route (#1045)
This commit is contained in:
1 parent
4f966eed86
commit
8badadb35f
24 files changed
+231
-79
No files matched your search
@@ -8,7 +8,6 @@ use once_cell::sync::Lazy;
|
||||
use tauri::{Manager, Url};
|
||||
use tauri_plugin_shell::process::{CommandChild, CommandEvent, TerminatedPayload};
|
||||
use tauri_plugin_shell::ShellExt;
|
||||
use crate::api_token::APIToken;
|
||||
use crate::runtime_api_token::API_TOKEN;
|
||||
use crate::app_window::change_location_to;
|
||||
use crate::runtime_certificate::CERTIFICATE_FINGERPRINT;
|
||||
@@ -109,7 +108,7 @@ fn describe_termination(payload: &TerminatedPayload) -> String {
|
||||
|
||||
/// Returns the desired port of the .NET server. Our .NET app calls this endpoint to get
|
||||
/// the port where the .NET server should listen to.
|
||||
pub async fn dotnet_port(_token: APIToken) -> String {
|
||||
pub async fn dotnet_port() -> String {
|
||||
let dotnet_server_port = *DOTNET_SERVER_PORT;
|
||||
format!("{dotnet_server_port}")
|
||||
}
|
||||
@@ -287,7 +286,7 @@ pub fn start_dotnet_server<R: tauri::Runtime>(app_handle: tauri::AppHandle<R>) {
|
||||
}
|
||||
|
||||
/// This endpoint is called by the .NET server to signal that the server is ready.
|
||||
pub async fn dotnet_ready(_token: APIToken) {
|
||||
pub async fn dotnet_ready() {
|
||||
|
||||
// We create a manual scope for the lock to be released as soon as possible.
|
||||
// This is necessary because we cannot await any function while the lock is
|
||||
|
||||
Reference in new issue
Block a user