mirror of
https://github.com/modrinth/code.git
synced 2026-08-26 09:34:50 +00:00
feat(labrinth): check privacy route (#7195)
* feat(labrinth): check privacy endpoint * refactor(labrinth): remove duplicated code
This commit is contained in:
@@ -16,6 +16,16 @@ pub struct UserPreferences {
|
||||
pub social: SocialPreferences,
|
||||
}
|
||||
|
||||
impl UserPreferences {
|
||||
pub fn resolve(overrides: Option<PartialUserPreferences>) -> Self {
|
||||
let mut preferences = Self::default();
|
||||
if let Some(overrides) = overrides {
|
||||
overrides.apply_to(&mut preferences);
|
||||
}
|
||||
preferences
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Debug, Serialize, Deserialize, ToSchema, Default, PartialEq, Component,
|
||||
)]
|
||||
|
||||
Reference in New Issue
Block a user