Minor user management changes
diff --git a/lib/Kalamar/Plugin/KalamarUser.pm b/lib/Kalamar/Plugin/KalamarUser.pm
index a7d13bb..209b8cb 100644
--- a/lib/Kalamar/Plugin/KalamarUser.pm
+++ b/lib/Kalamar/Plugin/KalamarUser.pm
@@ -13,6 +13,13 @@
$param = { %$param, %$config_param };
};
+ # Load 'notifications' plugin
+ unless (exists $mojo->renderer->helpers->{notify}) {
+ $mojo->plugin(Notifications => {
+ HTML => 1
+ });
+ };
+
# Set API!
$plugin->api($param->{api}) or return;
$plugin->ua(Mojo::UserAgent->new);
@@ -63,6 +70,14 @@
# Set cache
$c->chi('user')->set($auth => $user);
return 1;
+ }
+
+ elsif (my $e = $tx->error) {
+ $c->notify(
+ error =>
+ ($e->{code} ? $e->{code} . ': ' : '') .
+ $e->{message} . ' for Login (remote)'
+ );
};
$mojo->log->debug(qq!Login fail: "$user"!);
diff --git a/t/api-v0.1.t b/t/api_v0.1.t
similarity index 100%
rename from t/api-v0.1.t
rename to t/api_v0.1.t
diff --git a/t/non-blocking-api.t b/t/non_blocking_api.t
similarity index 100%
rename from t/non-blocking-api.t
rename to t/non_blocking_api.t