Skip to content

Commit

Permalink
Make component and file names consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
reosarevok committed Jan 27, 2021
1 parent d181e5c commit a57b065
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions lib/MusicBrainz/Server.pm
Expand Up @@ -506,8 +506,8 @@ around 'finalize_error' => sub {
try { $c->stash->{hostname} = hostname; } catch {};
$c->stash(
component_path => $timed_out
? 'main/error/Timeout'
: 'main/error/500',
? 'main/error/TimeoutError'
: 'main/error/Error500',
component_props => {
$c->stash->{edit} ? (edits => [ $c->stash->{edit} ]) : (),
formattedErrors => $c->stash->{formatted_errors},
Expand Down
16 changes: 8 additions & 8 deletions lib/MusicBrainz/Server/Controller/Root.pm
Expand Up @@ -148,7 +148,7 @@ sub error_400 : Private
);

$c->stash(
component_path => 'main/error/400',
component_path => 'main/error/Error400',
component_props => \%props,
current_view => 'Node',
);
Expand All @@ -160,7 +160,7 @@ sub error_401 : Private

$c->response->status(401);
$c->stash(
component_path => 'main/error/401',
component_path => 'main/error/Error401',
current_view => 'Node',
);
}
Expand All @@ -171,7 +171,7 @@ sub error_403 : Private

$c->response->status(403);
$c->stash(
component_path => 'main/error/403',
component_path => 'main/error/Error403',
current_view => 'Node',
);
}
Expand All @@ -181,7 +181,7 @@ sub error_404 : Private {

$c->response->status(404);
$c->stash(
component_path => 'main/error/404',
component_path => 'main/error/Error404',
component_props => { message => $message },
current_view => 'Node',
);
Expand All @@ -193,7 +193,7 @@ sub error_500 : Private

$c->response->status(500);
$c->stash(
component_path => 'main/error/500',
component_path => 'main/error/Error500',
component_props => {
useLanguages => boolean_to_json($c->stash->{use_languages}),
},
Expand All @@ -207,7 +207,7 @@ sub error_503 : Private

$c->response->status(503);
$c->stash(
component_path => 'main/error/503',
component_path => 'main/error/Error503',
current_view => 'Node',
);
}
Expand All @@ -218,7 +218,7 @@ sub error_mirror : Private

$c->response->status(403);
$c->stash(
component_path => 'main/error/Mirror403',
component_path => 'main/error/MirrorError403',
current_view => 'Node',
);
}
Expand All @@ -229,7 +229,7 @@ sub error_mirror_404 : Private

$c->response->status(404);
$c->stash(
component_path => 'main/error/Mirror404',
component_path => 'main/error/MirrorError404',
current_view => 'Node',
);
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions root/server/components.js
Expand Up @@ -102,15 +102,15 @@ module.exports = {
'label/LabelRelationships': require('../label/LabelRelationships'),
'label/SpecialPurpose': require('../label/SpecialPurpose'),
'main/ConfirmSeed': require('../main/ConfirmSeed'),
'main/error/400': require('../main/error/400'),
'main/error/401': require('../main/error/401'),
'main/error/403': require('../main/error/403'),
'main/error/404': require('../main/error/404'),
'main/error/500': require('../main/error/500'),
'main/error/503': require('../main/error/503'),
'main/error/Mirror403': require('../main/error/Mirror403'),
'main/error/Mirror404': require('../main/error/Mirror404'),
'main/error/Timeout': require('../main/error/Timeout'),
'main/error/Error400': require('../main/error/Error400'),
'main/error/Error401': require('../main/error/Error401'),
'main/error/Error403': require('../main/error/Error403'),
'main/error/Error404': require('../main/error/Error404'),
'main/error/Error500': require('../main/error/Error500'),
'main/error/Error503': require('../main/error/Error503'),
'main/error/MirrorError403': require('../main/error/MirrorError403'),
'main/error/MirrorError404': require('../main/error/MirrorError404'),
'main/error/TimeoutError': require('../main/error/TimeoutError'),
'main/index': require('../main/index'),
'mbid/NotFound': require('../mbid/NotFound'),
'oauth2/OAuth2Authorize': require('../oauth2/OAuth2Authorize'),
Expand Down

0 comments on commit a57b065

Please sign in to comment.