diff options
author | dakkar <dakkar@thenautilus.net> | 2018-01-02 17:18:39 +0000 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2018-01-02 17:18:39 +0000 |
commit | cfe34795b1d9db7ada11d18c4f76444060cdf60d (patch) | |
tree | 98e5d5c5bd6731d0ae656a33374d5d211ae2abe0 /lib/Ultramarine/Controller.pm6 | |
parent | test for musicfile (diff) | |
download | Ultramarine-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.pm6 | 7 |
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' { |