forked from rojo-rbx/rojo
Clean up warnings, add RojoTree into ServeSession
This commit is contained in:
@@ -53,11 +53,15 @@ impl ApiService {
|
||||
|
||||
/// Get a summary of information about the server
|
||||
fn handle_api_rojo(&self) -> Response<Body> {
|
||||
let tree = self.serve_session.tree();
|
||||
let root_instance_id = tree.get_root_id();
|
||||
|
||||
response_json(&ServerInfoResponse {
|
||||
server_version: SERVER_VERSION.to_owned(),
|
||||
protocol_version: PROTOCOL_VERSION,
|
||||
session_id: self.serve_session.session_id(),
|
||||
expected_place_ids: self.serve_session.serve_place_ids().map(Clone::clone),
|
||||
expected_place_ids: self.serve_session.serve_place_ids().cloned(),
|
||||
root_instance_id,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
use rbx_dom_weak::RbxId;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::session_id::SessionId;
|
||||
@@ -20,7 +21,7 @@ pub struct ServerInfoResponse {
|
||||
pub server_version: String,
|
||||
pub protocol_version: u64,
|
||||
pub expected_place_ids: Option<HashSet<u64>>,
|
||||
// pub root_instance_id: RbxId,
|
||||
pub root_instance_id: RbxId,
|
||||
}
|
||||
|
||||
/// Response body from /api/read/{id}
|
||||
|
||||
Reference in New Issue
Block a user