clean up subs

This commit is contained in:
Oliver Gorwits
2019-01-01 10:41:33 +00:00
parent f56c48b83d
commit 3b0a9f6310
2 changed files with 9 additions and 4 deletions

View File

@@ -59,8 +59,9 @@ hook 'before' => sub {
};
get qr{^/(?:login(?:/denied)?)?} => sub {
# FIXME not sure this is the right approach
if (param('return_url') and param('return_url') =~ m{^/api/}) {
status 403;
status('unauthorized')
return to_json {
error => 'not authorized',
return_url => param('return_url'),