chore: remove arch and platform fields from ServerInfo

These are static platform constants and don't need to be stored in the
database or exposed in the public model. Use crate::ARCH directly where
needed.
This commit is contained in:
Aiden McClelland
2026-03-31 20:50:48 -06:00
parent 5443f8dab1
commit a3575cf9a3
4 changed files with 1 additions and 19 deletions

View File

@@ -55,8 +55,6 @@ impl Public {
) -> Result<Self, Error> {
Ok(Self {
server_info: ServerInfo {
arch: get_arch(),
platform: get_platform(),
id: account.server_id.clone(),
version: Current::default().semver(),
name: account.hostname.name.clone(),
@@ -160,14 +158,6 @@ impl Public {
}
}
fn get_arch() -> InternedString {
(*ARCH).into()
}
fn get_platform() -> InternedString {
(&*PLATFORM).into()
}
pub fn default_echoip_urls() -> Vec<Url> {
vec![
"https://ipconfig.io".parse().unwrap(),
@@ -180,10 +170,6 @@ pub fn default_echoip_urls() -> Vec<Url> {
#[model = "Model<Self>"]
#[ts(export)]
pub struct ServerInfo {
#[serde(default = "get_arch")]
pub arch: InternedString,
#[serde(default = "get_platform")]
pub platform: InternedString,
pub id: String,
pub name: InternedString,
pub hostname: InternedString,