tangled
alpha
login
or
join now
t1c.dev
/
rocksky
forked from
rocksky.app/rocksky
2
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
2
fork
atom
overview
issues
pulls
pipelines
Merge branch 'main' into feat/feed-generator
tsiry-sandratraina.com
3 months ago
582d8a74
d4396b44
+8
-1
1 changed file
expand all
collapse all
unified
split
crates
scrobbler
src
auth.rs
+8
-1
crates/scrobbler/src/auth.rs
···
162
162
let jwt = generate_token(&user.did)?;
163
163
let client = reqwest::Client::new();
164
164
165
165
-
client
165
165
+
let res = client
166
166
.get(&format!(
167
167
"{}/xrpc/app.rocksky.actor.getProfile",
168
168
ROCKSKY_API
···
171
171
.send()
172
172
.await?
173
173
.error_for_status()?;
174
174
+
175
175
+
let profile: serde_json::Value = res.json().await?;
176
176
+
if profile.as_object().map_or(true, |obj| obj.is_empty()) {
177
177
+
return Err(Error::msg(
178
178
+
"ATProto session expired, please logout and login in https://rocksky.app and try again",
179
179
+
));
180
180
+
}
174
181
175
182
Ok(())
176
183
}