summaryrefslogtreecommitdiff
path: root/lib/Ultramarine/Controller.pm6
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Ultramarine/Controller.pm6')
-rw-r--r--lib/Ultramarine/Controller.pm69
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Ultramarine/Controller.pm6 b/lib/Ultramarine/Controller.pm6
index 35f37a9..e864b00 100644
--- a/lib/Ultramarine/Controller.pm6
+++ b/lib/Ultramarine/Controller.pm6
@@ -8,6 +8,7 @@ use Cro;
class Ultramarine::Controller {
has $.license is required;
has $.authorisation is required;
+ has $.collection is required;
sub respond(*@body) {
response.status = 200;
@@ -65,6 +66,14 @@ class Ultramarine::Controller {
]
],
}
+ # this is clearly not a Subsonic method
+ post -> 'dakkarList' {
+ await $!collection.is-ready;
+ respond [
+ :status<ok>,
+ songs => $!collection.all-songs,
+ ];
+ }
}
}