respond_to correction
This commit is contained in:
parent
1c2cee539d
commit
abebf60861
|
@ -391,9 +391,11 @@ sub delete {
|
|||
$msg = $c->l('File deleted');
|
||||
}
|
||||
return $c->respond_to(
|
||||
json => {
|
||||
json => {
|
||||
success => true,
|
||||
msg => $msg
|
||||
}
|
||||
},
|
||||
any => sub {
|
||||
$c->render(
|
||||
|
@ -406,9 +408,11 @@ sub delete {
|
|||
} else {
|
||||
my $msg = $c->l('Could not find the file. Are you sure of the URL and the token?');
|
||||
return $c->respond_to(
|
||||
json => {
|
||||
json => {
|
||||
success => false,
|
||||
msg => $msg
|
||||
}
|
||||
},
|
||||
any => sub {
|
||||
$c->render(
|
||||
|
@ -422,9 +426,11 @@ sub delete {
|
|||
} else {
|
||||
my $msg = $c->l('Could not delete the file. You are not authenticated.');
|
||||
return $c->respond_to(
|
||||
json => {
|
||||
json => {
|
||||
success => false,
|
||||
msg => $msg
|
||||
}
|
||||
},
|
||||
any => sub {
|
||||
$c->render(
|
||||
|
|
Loading…
Reference in New Issue