Skip to content

Commit

Permalink
Changes done
Browse files Browse the repository at this point in the history
  • Loading branch information
crqch committed Aug 30, 2024
1 parent 6ccb172 commit 8a3a099
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maz3",
"version": "0.1.0",
"version": "0.1.1",
"private": true,
"type": "module",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default function Game() {

const mutation = api.post.putScore.useMutation({
onSuccess: (r) => {
// if(r[0] === 1) setGameTime(-1)
if(r[0] === 1) setGameTime(-1)
setPostResult(r[1])
}
})
Expand Down
1 change: 0 additions & 1 deletion src/server/api/root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export const appRouter = createTRPCRouter({
}))
.mutation(({ input, ctx }): [number, string] => {
const ip = (ctx.headers.get('x-forwarded-for') ?? '127.0.0.1').split(',')[0]
if(new Date().getTime() > 2) return [1, ip ?? "none"]
if (input.time < 7) return [1, "Couldn't upload the score because it's too fast!"]
if (input.name.length < 3 && input.name !== "") return [0, "The name is too short"]
if (ip !== undefined && blacklist[ip] !== undefined) {
Expand Down

0 comments on commit 8a3a099

Please sign in to comment.