Get the daemon to actually work
This commit is contained in:
1 parent
587f82932b
commit
19345e771c
9 files changed
+175
-92
No files matched your search
+3
-2
@@ -1,6 +1,7 @@
|
||||
mod daemon;
|
||||
mod listenbrainz;
|
||||
mod models;
|
||||
mod playlist;
|
||||
mod subsonic;
|
||||
mod track;
|
||||
|
||||
@@ -40,7 +41,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
let app = Router::new()
|
||||
.route("/playlists", get(all_playlists))
|
||||
.route("/playlists", put(create_playlist))
|
||||
.route("/playlists", put(create_tracking_playlist))
|
||||
.with_state(database);
|
||||
|
||||
let listener = tokio::net::TcpListener::bind("localhost:3000").await?;
|
||||
@@ -68,7 +69,7 @@ enum Response<T> {
|
||||
Error(JsonError),
|
||||
}
|
||||
|
||||
async fn create_playlist(
|
||||
async fn create_tracking_playlist(
|
||||
State(pool): State<PgPool>,
|
||||
extract::Json(partial): extract::Json<PartialTrackedPlaylist>,
|
||||
) -> Json<Response<TrackedPlaylist>> {
|
||||
|
||||
Reference in new issue
Block a user