Redirect to page with documentation on root endpoint without username

This commit is contained in:
antonkomarev
2020-07-23 02:21:35 +03:00
parent 384456a73e
commit e1d8acbffd
2 changed files with 6 additions and 2 deletions

View File

@@ -48,8 +48,10 @@ try {
$username = trim($username);
if ($username === '') {
echo $badgeImageRenderer->renderBadgeWithError($badgeLabel, 'Invalid query parameter: username', $badgeStyle);
header('Location: https://github.com/antonkomarev/github-profile-views-counter');
exit;
// echo $badgeImageRenderer->renderBadgeWithError($badgeLabel, 'Invalid query parameter: username', $badgeStyle);
// exit;
}
$username = new Username($username);

View File

@@ -52,8 +52,10 @@ try {
$username = trim($username);
if ($username === '') {
echo $badgeImageRenderer->renderBadgeWithError($badgeLabel, 'Invalid query parameter: username', $badgeStyle);
header('Location: https://github.com/antonkomarev/github-profile-views-counter');
exit;
// echo $badgeImageRenderer->renderBadgeWithError($badgeLabel, 'Invalid query parameter: username', $badgeStyle);
// exit;
}
$username = new Username($username);