add: profile connections, spotify connection
This commit is contained in:
parent
a5c2356940
commit
33ba576d4a
31 changed files with 931 additions and 19 deletions
|
@ -150,6 +150,21 @@ impl Default for TurnstileConfig {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize, Debug)]
|
||||
pub struct ConnectionsConfig {
|
||||
/// <https://developer.spotify.com/documentation/web-api>
|
||||
#[serde(default)]
|
||||
pub spotify_client_id: Option<String>,
|
||||
}
|
||||
|
||||
impl Default for ConnectionsConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
spotify_client_id: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Configuration file
|
||||
#[derive(Clone, Serialize, Deserialize, Debug)]
|
||||
pub struct Config {
|
||||
|
@ -205,6 +220,8 @@ pub struct Config {
|
|||
/// This community **must** have open write access.
|
||||
#[serde(default)]
|
||||
pub town_square: usize,
|
||||
#[serde(default)]
|
||||
pub connections: ConnectionsConfig,
|
||||
}
|
||||
|
||||
fn default_name() -> String {
|
||||
|
@ -269,6 +286,10 @@ fn default_turnstile() -> TurnstileConfig {
|
|||
TurnstileConfig::default()
|
||||
}
|
||||
|
||||
fn default_connections() -> ConnectionsConfig {
|
||||
ConnectionsConfig::default()
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
|
@ -286,6 +307,7 @@ impl Default for Config {
|
|||
policies: default_policies(),
|
||||
turnstile: default_turnstile(),
|
||||
town_square: 0,
|
||||
connections: default_connections(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue