Fix home page upload to use json api instead of seperate upload code

This commit is contained in:
Tom Bloor 2017-04-21 23:38:12 +01:00
parent 00b0687136
commit a097db2017
6 changed files with 27 additions and 115 deletions

View file

@ -142,7 +142,9 @@ sub startup {
$user_routes->get('/home')->to('root#home');
$user_routes->post('/portal/upload')->to('portal#post_upload');
my $portal_api = $r->under('/portal')->to('api-auth#check_json')->under('/')->to('portal#under');
$portal_api->post('/upload')->to('api-upload#post_upload');
$self->hook( before_dispatch => sub {
my $self = shift;