Function caesar_core::relay::server::upload_info
source · pub async fn upload_info(
__arg0: State<Arc<RwLock<AppState>>>,
__arg1: Json<TransferRequest>
) -> impl IntoResponseExpand description
Handles the upload_info route.
It updates or creates a new transfer request in the shared state. If the request is found in the shared state, it updates the relay_room_id or local_room_id based on the payload. If the request is not found, it creates a new transfer request and adds it to the shared state.
§Arguments
shared_state- The shared state containing the transfer requests.payload- The JSON payload containing the transfer request information.
§Returns
A tuple of the HTTP status code and the JSON response.