Skip to content

Commit 7038dac

Browse files
cleaning codebase and bug fixes
1 parent 5678f16 commit 7038dac

44 files changed

Lines changed: 399 additions & 311 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import nextConfig from 'eslint-config-next';
2+
import prettierConfig from 'eslint-config-prettier';
3+
4+
const eslintConfig = [...nextConfig, prettierConfig];
5+
6+
export default eslintConfig;

next.config.mjs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
/** @type {import('next').NextConfig} */
2-
const nextConfig = {
3-
images: {
4-
remotePatterns: [
5-
{ protocol: 'https', hostname: 'media.licdn.com' },
6-
{ protocol: 'https', hostname: 'github.com' },
7-
{ protocol: 'https', hostname: 'raw.githubusercontent.com' },
8-
],
9-
},
10-
};
2+
const nextConfig = {};
113

124
export default nextConfig;

package-lock.json

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,20 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "next lint",
9+
"lint": "eslint .",
1010
"format": "prettier --write ."
1111
},
1212
"dependencies": {
1313
"@typegoose/typegoose": "13.2.1",
14-
"daisyui": "5.5.19",
14+
"daisyui": "^5.5.19",
1515
"mongoose": "9.2.4",
1616
"next": "16.2.1",
1717
"nodemailer": "8.0.4",
1818
"react": "19.2.4",
1919
"react-dom": "19.2.4"
2020
},
2121
"devDependencies": {
22+
"@eslint/eslintrc": "^3.3.5",
2223
"@tailwindcss/postcss": "^4.2.2",
2324
"@types/node": "22.13.0",
2425
"@types/nodemailer": "7.0.11",
@@ -29,7 +30,7 @@
2930
"eslint-config-prettier": "10.1.8",
3031
"postcss": "8.5.8",
3132
"prettier": "3.8.1",
32-
"tailwindcss": "4.2.2",
33+
"tailwindcss": "^4.2.2",
3334
"typescript": "^5.0.0"
3435
}
3536
}

postcss.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/** @type {import('postcss-load-config').Config} */
12
const config = {
23
plugins: {
34
'@tailwindcss/postcss': {},

public/cornellappdev_logo.jpeg

6.15 KB
Loading

src/app/.!83442!favicon.ico

Whitespace-only changes.

src/app/api/apps/[id]/route.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
import { NextResponse } from 'next/server';
2-
import AppController from '../../../../server/apps/controllers';
3-
import { successJson } from '../../../../server/utils/jsonResponses';
4-
import { dbConnect } from '../../../../server/database';
2+
import AppController from '@/app/api/apps/controllers';
3+
import { successJson } from '@/app/api/utils/jsonResponses';
4+
import { dbConnect } from '@/app/api/database';
55

66
export async function GET(
7-
req: Request,
7+
_req: Request,
88
{ params }: { params: Promise<{ id: string }> },
99
) {
1010
await dbConnect();
1111
try {
1212
const app = await AppController.getAppById((await params).id);
1313
return NextResponse.json(successJson(app), { status: 200 });
14-
} catch (err: any) {
15-
return NextResponse.json({ error: err.message }, { status: 500 });
14+
} catch (err: unknown) {
15+
return NextResponse.json(
16+
{ error: err instanceof Error ? err.message : 'Unknown error' },
17+
{ status: 500 },
18+
);
1619
}
1720
}

src/app/api/apps/app-down/[id]/route.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { NextResponse } from 'next/server';
2-
import AppController from '../../../../../server/apps/controllers';
3-
import { successJson } from '../../../../../server/utils/jsonResponses';
4-
import { dbConnect } from '../../../../../server/database';
2+
import AppController from '@/app/api/apps/controllers';
3+
import { successJson } from '@/app/api/utils/jsonResponses';
4+
import { dbConnect } from '@/app/api/database';
55

66
export async function POST(
77
req: Request,
@@ -18,7 +18,10 @@ export async function POST(
1818
body.endTime,
1919
);
2020
return NextResponse.json(successJson('status updated'), { status: 201 });
21-
} catch (err: any) {
22-
return NextResponse.json({ error: err.message }, { status: 500 });
21+
} catch (err: unknown) {
22+
return NextResponse.json(
23+
{ error: err instanceof Error ? err.message : 'Unknown error' },
24+
{ status: 500 },
25+
);
2326
}
2427
}

0 commit comments

Comments
 (0)