fix(people): fix small type mismatch
This commit is contained in:
parent
c61db2c47d
commit
b314023a60
1 changed files with 4 additions and 4 deletions
|
|
@ -261,15 +261,15 @@ struct GetOwnProfileData{
|
||||||
|
|
||||||
#[get("/v1/api/people/@me/profile")]
|
#[get("/v1/api/people/@me/profile")]
|
||||||
pub fn get_own_profile(user: Auth<false>) -> Ds<Xml<GetOwnProfileData>>{
|
pub fn get_own_profile(user: Auth<false>) -> Ds<Xml<GetOwnProfileData>>{
|
||||||
build_own_profile(user)
|
build_own_profile(user.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/v1/api/people/@me/devices/owner")]
|
#[get("/v1/api/people/@me/devices/owner")]
|
||||||
pub fn get_device_owner(user: Auth<true>) -> Ds<Xml<GetOwnProfileData>>{
|
pub fn get_device_owner(user: Auth<true>) -> Ds<Xml<GetOwnProfileData>>{
|
||||||
build_own_profile(user)
|
build_own_profile(user.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_own_profile(user: Auth<false>) -> Ds<Xml<GetOwnProfileData>> {
|
fn build_own_profile(user: User) -> Ds<Xml<GetOwnProfileData>> {
|
||||||
let User {
|
let User {
|
||||||
username,
|
username,
|
||||||
pid,
|
pid,
|
||||||
|
|
@ -288,7 +288,7 @@ fn build_own_profile(user: Auth<false>) -> Ds<Xml<GetOwnProfileData>> {
|
||||||
off_device_allowed,
|
off_device_allowed,
|
||||||
region,
|
region,
|
||||||
..
|
..
|
||||||
} = user.into();
|
};
|
||||||
|
|
||||||
let timezone_offset = (&*OFFSET_FROM_TIMEZONE).get(&timezone).unwrap().to_owned();
|
let timezone_offset = (&*OFFSET_FROM_TIMEZONE).get(&timezone).unwrap().to_owned();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue