mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Refactor upload command to use rbx_cookie for Roblox auth cookie retrieval
- Updated the cookie retrieval logic to use rbx_cookie::get_value instead of get_auth_cookie. - Enhanced error message to guide users on logging into Roblox Studio or passing a cookie via --cookie.
This commit is contained in:
parent
cec2c9f26e
commit
0b1e8c89dc
1 changed files with 6 additions and 4 deletions
|
|
@ -8,7 +8,7 @@ use reqwest::{
|
||||||
StatusCode,
|
StatusCode,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{auth_cookie::get_auth_cookie, serve_session::ServeSession};
|
use crate::serve_session::ServeSession;
|
||||||
|
|
||||||
use super::resolve_path;
|
use super::resolve_path;
|
||||||
|
|
||||||
|
|
@ -67,9 +67,11 @@ impl UploadCommand {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let cookie = cookie.or_else(get_auth_cookie).context(
|
let cookie = cookie
|
||||||
"Rojo could not find your Roblox auth cookie. Please pass one via --cookie.",
|
.or_else(rbx_cookie::get_value)
|
||||||
)?;
|
.context(
|
||||||
|
"Rojo could not find your Roblox auth cookie. Please log into Roblox Studio or pass one via --cookie.",
|
||||||
|
)?;
|
||||||
do_upload(buffer, self.asset_id, &cookie)
|
do_upload(buffer, self.asset_id, &cookie)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue