Skip to content

Commit d174240

Browse files
authored
Merge pull request #67 from crux-bphc/chore/pre-release-cleanup
Pre release cleanup
2 parents 6c9188c + 92931ba commit d174240

8 files changed

Lines changed: 16 additions & 11 deletions

File tree

backend/src/controllers/codeforces.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ export async function fetchUserRatingChanges(
6464
jobId: `${cfHandle}-RatingRefresh`,
6565
}
6666
);
67-
console.log(`Enqueued job for ${cfHandle}`);
67+
console.log(
68+
`Enqueued fetchUserRatingChanges job for ${cfHandle} (Priority: ${priority})`
69+
);
6870
}
6971

7072
export async function fetchRatingChanges() {
@@ -113,5 +115,7 @@ export async function fetchUserSubmissions(
113115
jobId: `${cfHandle}-SubmissionsRefresh`,
114116
}
115117
);
116-
console.log(`Enqueued job for ${cfHandle}`);
118+
console.log(
119+
`Enqueued fetchUserSubmissions job for ${cfHandle} (Priority: ${priority})`
120+
);
117121
}

backend/src/controllers/potd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export async function getCurrentPotd(
3636
potdId = scheduled[0].pt.id;
3737
} else {
3838
// Fallback to a random problem
39-
problemRow = await getRandomProblem(800, 2000);
39+
problemRow = await getRandomProblem(800, 1800);
4040
const inserted = await db
4141
.insert(potd)
4242
.values({ date: today, problemId: problemRow.id })

backend/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ passport.serializeUser((user, done) => {
103103
});
104104

105105
passport.deserializeUser(async (userId: string, done) => {
106-
console.log(userId);
106+
// console.log(userId);
107107
try {
108108
const user = await db
109109
.select()

backend/src/routes/contest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const router = express.Router();
1414
let contestsCache: Contest[] = [];
1515

1616
const BASE_URL = "https://clist.by:443/api/v4/contest/";
17-
const HOST_REGEX = "^(codeforces\.com|codechef\.com|atcoder\.jp)$";
17+
const HOST_REGEX =
18+
"^(codeforces\.com|codechef\.com|atcoder\.jp|leetcode\.com)$";
1819

1920
const fetchContests = async () => {
2021
try {

frontend/src/components/Dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default function Dropdown({
4848
{dropDownOptions.map((option, index) => (
4949
<Link
5050
to="."
51-
key={option !== "" ? option : undefined}
51+
key={`${field}-${option || "N/A"}`}
5252
search={(prev) => updateDropdown(prev, field, option || undefined)}
5353
onClick={() => setIsOpen(false)}
5454
className="absolute top-0 flex rounded-sm h-8 w-full max-w-[10.5rem] shadow-3xl cursor-pointer items-center justify-center border border-y-1 border-x-0 border-[#1B1E30] bg-[#25293E] transition-all duration-200 ease-out hover:bg-[#25294F] md:w-42"

frontend/src/components/POTDStreakHeatmap.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ export default function PotdStreakHeatmap() {
110110

111111
<div className="flex">
112112
<div className="hidden md:flex flex-col justify-between text-xs text-gray-400 mr-2 w-5">
113-
{["", "Mon", "", "Wed", "", "Fri", ""].map((d) => (
114-
<div key={d} className="h-4">
113+
{["", "Mon", "", "Wed", "", "Fri", ""].map((d, i) => (
114+
<div key={i} className="h-4">
115115
{d}
116116
</div>
117117
))}

frontend/src/components/StreakHeatMap.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ export default function StreakHeatmap({ handle }: { handle: string }) {
224224

225225
<div className="flex">
226226
<div className="hidden md:flex flex-col justify-between text-xs text-gray-400 mr-2 w-5">
227-
{["", "Mon", "", "Wed", "", "Fri", ""].map((d) => (
228-
<div key={d} className="h-4">
227+
{["", "Mon", "", "Wed", "", "Fri", ""].map((d, i) => (
228+
<div key={i} className="h-4">
229229
{d}
230230
</div>
231231
))}

frontend/src/context/AuthContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
3838
})
3939
.then((res) => (res.status === 401 ? null : res.json()))
4040
.then((data) => {
41-
console.log(data?.user);
41+
// console.log(data?.user);
4242
setUser(data?.user || null);
4343
setLoading(false);
4444
})

0 commit comments

Comments
 (0)