diff options
author | Vika <vika@fireburn.ru> | 2022-07-27 11:10:43 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2022-07-27 11:10:43 +0300 |
commit | e88b656a7bd4e87d431249b37db75dec5ecc4e85 (patch) | |
tree | 2eb9cb5bacebe9d8a0771834f531fc455e283a87 /kittybox-rs/indieauth | |
parent | 63bb7a3d602cacbf93e3e9666b48ee9e586a3e8f (diff) | |
download | kittybox-e88b656a7bd4e87d431249b37db75dec5ecc4e85.tar.zst |
indieauth: replace numerous placeholders in the prototype
Fetching profiles is now fully implemented. The only missing pieces are the frontend template and the persistent store for tokens and codes.
Diffstat (limited to 'kittybox-rs/indieauth')
-rw-r--r-- | kittybox-rs/indieauth/src/lib.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kittybox-rs/indieauth/src/lib.rs b/kittybox-rs/indieauth/src/lib.rs index 1f84270..745ee1e 100644 --- a/kittybox-rs/indieauth/src/lib.rs +++ b/kittybox-rs/indieauth/src/lib.rs @@ -208,11 +208,14 @@ impl axum_core::response::IntoResponse for Metadata { #[derive(Clone, Debug, Serialize, Deserialize)] pub struct Profile { /// User's chosen name. - pub name: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option<String>, /// User's profile page. Fetching it may reveal an `h-card`. - pub url: Url, + #[serde(skip_serializing_if = "Option::is_none")] + pub url: Option<Url>, /// User's profile picture suitable to represent them. - pub photo: Url, + #[serde(skip_serializing_if = "Option::is_none")] + pub photo: Option<Url>, /// User's email, if they've chosen to reveal it. This is guarded /// by the `email` scope. #[serde(skip_serializing_if = "Option::is_none")] |