add: profile connections, spotify connection

This commit is contained in:
trisua 2025-04-26 16:27:18 -04:00
parent a5c2356940
commit 33ba576d4a
31 changed files with 931 additions and 19 deletions

View file

@ -59,6 +59,20 @@ pub async fn redirect_from_ip(
}
}
pub async fn me_request(jar: CookieJar, Extension(data): Extension<State>) -> impl IntoResponse {
let data = &(data.read().await).0;
let user = match get_user_from_token!(jar, data) {
Some(ua) => ua,
None => return Json(Error::NotAllowed.into()),
};
return Json(ApiReturn {
ok: true,
message: "User exists".to_string(),
payload: Some(user),
});
}
/// Update the settings of the given user.
pub async fn update_user_settings_request(
jar: CookieJar,