Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
LJ authored and LJ committed Jan 27, 2024
1 parent c504307 commit e78b169
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
1 change: 1 addition & 0 deletions .config/extra.dic
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ timestamp
accounts's
bool
codebases
VR
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"onlivfe",
"onlivfe_cache_store",
Expand Down Expand Up @@ -26,10 +27,10 @@ onlivfe_db_store= { version = "=0.0.0-alpha.0", path = "onlivfe_db_store" }

# Data mangling
serde = { version = "1" }
serde_with = { version = "2.3", features = ["time_0_3", "json"] }
serde_with = { version = "3", features = ["time_0_3", "json"] }
uuid = { version = "1.3", features = ["serde"] }
time = { version = "0.3", features = ["serde-well-known"] }
strum = { version = "0.24" }
strum = { version = "0.25" }

# Utility
log = "0.4"
Expand All @@ -43,5 +44,5 @@ neos = { version = "0.6.4", features = [], default-features = false }
#neos = { path = "../neos_rs", features = [] }
chilloutvr = { version = "0.4.0", features = [] }
#chilloutvr = { path = "../chilloutvr_rs", features = [] }
vrc = { version = "0.1.1", features = [] }
vrc = { version = "0.2.0", features = [] }
#vrc = { path = "../vrc_rs", features = [] }
24 changes: 18 additions & 6 deletions onlivfe_net/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,25 @@ impl OnlivfeApiClient {
) -> Result<Instance, String> {
match instance_id {
InstanceId::VRChat(instance_id) => {
let PlatformAccountId::VRChat(get_as) = get_as else { return Err("Auth and platform types don't match!".to_owned()) };
let PlatformAccountId::VRChat(get_as) = get_as else {
return Err("Auth and platform types don't match!".to_owned());
};
let instance = self.instance_vrchat(&get_as, instance_id).await?;
Ok(Instance::VRChat(PlatformDataAndMetadata::new_now(instance, get_as)))
}
InstanceId::ChilloutVR(instance_id) => {
let PlatformAccountId::ChilloutVR(get_as) = get_as else { return Err("Auth and platform types don't match!".to_owned()) };
let PlatformAccountId::ChilloutVR(get_as) = get_as else {
return Err("Auth and platform types don't match!".to_owned());
};
let instance = self.instance_chilloutvr(&get_as, instance_id).await?;
Ok(Instance::ChilloutVR(PlatformDataAndMetadata::new_now(
instance, get_as,
)))
}
InstanceId::NeosVR(instance_id) => {
let PlatformAccountId::NeosVR(get_as) = get_as else { return Err("Auth and platform types don't match!".to_owned()) };
let PlatformAccountId::NeosVR(get_as) = get_as else {
return Err("Auth and platform types don't match!".to_owned());
};
let instance = self.instance_neosvr(&get_as, instance_id).await?;
Ok(Instance::NeosVR(PlatformDataAndMetadata::new_now(instance, get_as)))
}
Expand All @@ -266,23 +272,29 @@ impl OnlivfeApiClient {
) -> Result<PlatformAccount, String> {
match account_id {
PlatformAccountId::VRChat(account_id) => {
let PlatformAccountId::VRChat(get_as) = get_as else { return Err("Auth and platform types don't match!".to_owned()) };
let PlatformAccountId::VRChat(get_as) = get_as else {
return Err("Auth and platform types don't match!".to_owned());
};
let account = self.user_vrchat(&get_as, account_id).await?;
Ok(PlatformAccount::VRChat(PlatformDataAndMetadata::new_now(
Box::new(account),
get_as,
)))
}
PlatformAccountId::ChilloutVR(account_id) => {
let PlatformAccountId::ChilloutVR(get_as) = get_as else { return Err("Auth and platform types don't match!".to_owned()) };
let PlatformAccountId::ChilloutVR(get_as) = get_as else {
return Err("Auth and platform types don't match!".to_owned());
};
let account = self.user_chilloutvr(&get_as, account_id).await?;
Ok(PlatformAccount::ChilloutVR(PlatformDataAndMetadata::new_now(
Box::new(account),
get_as,
)))
}
PlatformAccountId::NeosVR(account_id) => {
let PlatformAccountId::NeosVR(get_as) = get_as else { return Err("Auth and platform types don't match!".to_owned()) };
let PlatformAccountId::NeosVR(get_as) = get_as else {
return Err("Auth and platform types don't match!".to_owned());
};
let account = self.user_neosvr(&get_as, account_id).await?;
Ok(PlatformAccount::NeosVR(PlatformDataAndMetadata::new_now(
Box::new(account),
Expand Down

0 comments on commit e78b169

Please sign in to comment.