Formatting

This commit is contained in:
Antoine Gersant 2019-09-29 00:34:45 -07:00
parent 165ed277b6
commit 064056fc0c
2 changed files with 77 additions and 72 deletions

View file

@ -1,98 +1,98 @@
table! { table! {
ddns_config (id) { ddns_config (id) {
id -> Integer, id -> Integer,
host -> Text, host -> Text,
username -> Text, username -> Text,
password -> Text, password -> Text,
} }
} }
table! { table! {
directories (id) { directories (id) {
id -> Integer, id -> Integer,
path -> Text, path -> Text,
parent -> Nullable<Text>, parent -> Nullable<Text>,
artist -> Nullable<Text>, artist -> Nullable<Text>,
year -> Nullable<Integer>, year -> Nullable<Integer>,
album -> Nullable<Text>, album -> Nullable<Text>,
artwork -> Nullable<Text>, artwork -> Nullable<Text>,
date_added -> Integer, date_added -> Integer,
} }
} }
table! { table! {
misc_settings (id) { misc_settings (id) {
id -> Integer, id -> Integer,
auth_secret -> Binary, auth_secret -> Binary,
index_sleep_duration_seconds -> Integer, index_sleep_duration_seconds -> Integer,
index_album_art_pattern -> Text, index_album_art_pattern -> Text,
prefix_url -> Text, prefix_url -> Text,
} }
} }
table! { table! {
mount_points (id) { mount_points (id) {
id -> Integer, id -> Integer,
source -> Text, source -> Text,
name -> Text, name -> Text,
} }
} }
table! { table! {
playlist_songs (id) { playlist_songs (id) {
id -> Integer, id -> Integer,
playlist -> Integer, playlist -> Integer,
path -> Text, path -> Text,
ordering -> Integer, ordering -> Integer,
} }
} }
table! { table! {
playlists (id) { playlists (id) {
id -> Integer, id -> Integer,
owner -> Integer, owner -> Integer,
name -> Text, name -> Text,
} }
} }
table! { table! {
songs (id) { songs (id) {
id -> Integer, id -> Integer,
path -> Text, path -> Text,
parent -> Text, parent -> Text,
track_number -> Nullable<Integer>, track_number -> Nullable<Integer>,
disc_number -> Nullable<Integer>, disc_number -> Nullable<Integer>,
title -> Nullable<Text>, title -> Nullable<Text>,
artist -> Nullable<Text>, artist -> Nullable<Text>,
album_artist -> Nullable<Text>, album_artist -> Nullable<Text>,
year -> Nullable<Integer>, year -> Nullable<Integer>,
album -> Nullable<Text>, album -> Nullable<Text>,
artwork -> Nullable<Text>, artwork -> Nullable<Text>,
duration -> Nullable<Integer>, duration -> Nullable<Integer>,
} }
} }
table! { table! {
users (id) { users (id) {
id -> Integer, id -> Integer,
name -> Text, name -> Text,
password_hash -> Text, password_hash -> Text,
admin -> Integer, admin -> Integer,
lastfm_username -> Nullable<Text>, lastfm_username -> Nullable<Text>,
lastfm_session_key -> Nullable<Text>, lastfm_session_key -> Nullable<Text>,
} }
} }
joinable!(playlist_songs -> playlists (playlist)); joinable!(playlist_songs -> playlists (playlist));
joinable!(playlists -> users (owner)); joinable!(playlists -> users (owner));
allow_tables_to_appear_in_same_query!( allow_tables_to_appear_in_same_query!(
ddns_config, ddns_config,
directories, directories,
misc_settings, misc_settings,
mount_points, mount_points,
playlist_songs, playlist_songs,
playlists, playlists,
songs, songs,
users, users,
); );

View file

@ -34,7 +34,12 @@ pub fn get_server(
.manage(db) .manage(db)
.manage(command_sender) .manage(command_sender)
.mount(&api_url, crate::api::get_routes()) .mount(&api_url, crate::api::get_routes())
.mount(&swagger_url, StaticFiles::from(swagger_dir_path).rank(swagger_routes_rank)) .mount(
.mount(&web_url, StaticFiles::from(web_dir_path).rank(web_routes_rank)) &swagger_url,
) StaticFiles::from(swagger_dir_path).rank(swagger_routes_rank),
)
.mount(
&web_url,
StaticFiles::from(web_dir_path).rank(web_routes_rank),
))
} }