Skip to content

Commit

Permalink
EDIT redirect to home if url is null
Browse files Browse the repository at this point in the history
  • Loading branch information
pjshwa committed Mar 2, 2024
1 parent bfcb9bb commit f40c2ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions leet.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
$now = gmdate('Y-m-d');
$url = $db->getDailyLeetCode($now);

if ($url == null) {
$url = "https://www.leetcode.com";
}

// Redirect to the daily leetcode problem
header("Location: $url");
?>

0 comments on commit f40c2ad

Please sign in to comment.