feat(devices): add final route required for logging in

This commit is contained in:
Andrea Toska 2025-04-26 20:25:49 +02:00
commit f0eb152b7d
No known key found for this signature in database
GPG key ID: 5B3C83807CCBE9A2
2 changed files with 6 additions and 0 deletions

View file

@ -115,6 +115,7 @@ async fn launch() -> _ {
nnid::people::create_account,
nnid::people::get_own_profile,
nnid::people::get_device_owner,
nnid::people::get_own_device,
nnid::oauth::generate_token::generate_token,
nnid::provider::get_nex_token,
nnid::provider::get_service_token,

View file

@ -269,6 +269,11 @@ pub fn get_device_owner(user: Auth<false>) -> Ds<Xml<GetOwnProfileData>>{
build_own_profile(user.into())
}
#[post("/v1/api/people/@me/devices")]
pub fn get_own_device(user: Auth<false>) -> Ds<Xml<GetOwnProfileData>>{
build_own_profile(user.into())
}
fn build_own_profile(user: User) -> Ds<Xml<GetOwnProfileData>> {
let User {
username,