From 68d787023464d273838db2421d6083b0e2b0fefb Mon Sep 17 00:00:00 2001 From: Michael Skogberg Date: Sun, 8 Dec 2024 18:28:26 +0200 Subject: [PATCH] Fix task execution --- .../app/com/malliina/musicpimp/cloud/CloudSocket.scala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/musicpimp/app/com/malliina/musicpimp/cloud/CloudSocket.scala b/musicpimp/app/com/malliina/musicpimp/cloud/CloudSocket.scala index 2e66ea72..0a08ec74 100644 --- a/musicpimp/app/com/malliina/musicpimp/cloud/CloudSocket.scala +++ b/musicpimp/app/com/malliina/musicpimp/cloud/CloudSocket.scala @@ -271,15 +271,17 @@ class CloudSocket( case t => log.error(s"Database failure when authenticating '$user'.", t) false - authentication map { isValid => - if isValid then sendSuccess(request, JsonMessages.version) - else sendFailure(request, JsonMessages.invalidCredentials) - } + authentication + .unsafeToFuture() + .map: isValid => + if isValid then sendSuccess(request, JsonMessages.version) + else sendFailure(request, JsonMessages.invalidCredentials) case GetVersion => sendSuccess(request, JsonMessages.version) case GetMeta(id) => lib .meta(id) + .unsafeToFuture() .map: maybeTrack => maybeTrack .map: track =>