Skip to content

Commit

Permalink
fix(rbx_api): replace deprecated create asset alias API with new API (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
blake-mealey authored Jul 10, 2024
1 parent 9a7910c commit f1ef4e6
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions mantle/rbx_api/src/asset_aliases/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
mod models;

use reqwest::header;
use serde_json::json;

use crate::{
errors::RobloxApiResult,
Expand All @@ -21,15 +20,14 @@ impl RobloxApi {
) -> RobloxApiResult<()> {
let req = self
.client
.post(format!(
"https://develop.roblox.com/v1/universes/{}/aliases",
experience_id
))
.json(&json!({
"name": name,
"type": "1",
"targetId": asset_id,
}));
.post("https://apis.roblox.com/content-aliases-api/v1/universes/create-alias")
.header(header::CONTENT_LENGTH, 0)
.query(&[
("universeId", experience_id.to_string().as_str()),
("name", name.as_str()),
("type", "1"),
("targetId", asset_id.to_string().as_str()),
]);

handle(req).await?;

Expand Down

0 comments on commit f1ef4e6

Please sign in to comment.