summaryrefslogtreecommitdiff
path: root/lib/Ultramarine/Controller.pm6
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2018-01-02 17:18:39 +0000
committerdakkar <dakkar@thenautilus.net>2018-01-02 17:18:39 +0000
commitcfe34795b1d9db7ada11d18c4f76444060cdf60d (patch)
tree98e5d5c5bd6731d0ae656a33374d5d211ae2abe0 /lib/Ultramarine/Controller.pm6
parenttest for musicfile (diff)
downloadUltramarine-cfe34795b1d9db7ada11d18c4f76444060cdf60d.tar.gz
Ultramarine-cfe34795b1d9db7ada11d18c4f76444060cdf60d.tar.bz2
Ultramarine-cfe34795b1d9db7ada11d18c4f76444060cdf60d.zip
better structure, and test, for License
Diffstat (limited to 'lib/Ultramarine/Controller.pm6')
-rw-r--r--lib/Ultramarine/Controller.pm67
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Ultramarine/Controller.pm6 b/lib/Ultramarine/Controller.pm6
index 208a50b..f5cbd64 100644
--- a/lib/Ultramarine/Controller.pm6
+++ b/lib/Ultramarine/Controller.pm6
@@ -53,9 +53,14 @@ class Ultramarine::Controller {
before $!authorisation;
post -> 'ping' { respond [] }
post -> 'getLicense' {
+ my $expires = $.license.expires-at.DateTime.truncated-to('second');
respond [
:status<ok>,
- license => [ |%($.license.status) ],
+ license => [
+ :valid($.license.is-valid.Str.lc),
+ :email($.license.email),
+ :licenseExpires($expires.yyyy-mm-dd ~ ':' ~ $expires.hh-mm-ss),
+ ],
],
}
post -> 'getMusicFolders' {