mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 06:19:44 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user