Skip to content

Commit

Permalink
Fix challenge points bug (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImJunny authored Dec 6, 2024
1 parent f086b42 commit cca3965
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/_components/challenges/challenge-content-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function ChallengeContentInfo({
}: ChallengeContentInfo) {
if (isSuccess) {
return (
<div className="flex flex-col space-y-4 p-4">
<div className="mb-6 flex flex-col space-y-4 p-4 md:mb-0">
<div className="space-x-2">
<Badge
className={cn(
Expand Down
1 change: 1 addition & 0 deletions src/app/_components/challenges/challenge-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export default function ChallengeEditorWrapper({
readOnly: solved,
minimap: { enabled: false },
automaticLayout: true,
contextmenu: false,
}}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/server/dao/challenges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ export async function solveChallenge(

const isSolvedAlready = await db.query.app_solved_challenges.findFirst({
columns: {
solved_challenge_uuid: true,
solved_challenge_foreign_uuid: true,
solved_challenge_team_uuid: true,
},
where: and(
Expand Down
4 changes: 2 additions & 2 deletions src/server/dao/team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ export async function joinTeam(

if (!team_from_team_name?.team_uuid) {
throw new BaseError({
error_title: "Invalid team name.",
error_desc: "The provided team name is invalid.",
error_title: "Invalid team.",
error_desc: "Team does not exist.",
});
}

Expand Down

0 comments on commit cca3965

Please sign in to comment.