From b9171f01358fd39cc18c62c186f8b4a55e0b5245 Mon Sep 17 00:00:00 2001 From: Harxhit Date: Sun, 24 May 2026 17:07:11 +0530 Subject: [PATCH 1/4] fix: Fixed linting issues --- apps/backend/src/app.ts | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/apps/backend/src/app.ts b/apps/backend/src/app.ts index 6a937a88..f817eb46 100644 --- a/apps/backend/src/app.ts +++ b/apps/backend/src/app.ts @@ -1,30 +1,31 @@ -import Fastify from 'fastify'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import cookie from '@fastify/cookie'; import cors from '@fastify/cors'; import helmet from '@fastify/helmet'; import jwt from '@fastify/jwt'; -import cookie from '@fastify/cookie'; import multipart from '@fastify/multipart'; -import fastifyStatic from '@fastify/static'; import rateLimit from '@fastify/rate-limit'; -import path from 'path'; -import { fileURLToPath } from 'url'; +import fastifyStatic from '@fastify/static'; +import Fastify, {type FastifyInstance} from 'fastify'; import { prismaPlugin } from './plugins/prisma.js'; import { redisPlugin } from './plugins/redis.js'; +import { analyticsRoutes } from './routes/analytics.js'; import { authRoutes } from './routes/auth.js'; -import { profileRoutes } from './routes/profiles.js'; import { cardRoutes } from './routes/cards.js'; -import { publicRoutes } from './routes/public.js'; -import { followRoutes } from './routes/follow.js'; import { connectRoutes } from './routes/connect.js'; -import { analyticsRoutes } from './routes/analytics.js'; -import { nfcRoutes } from './routes/nfc.js'; import { eventRoutes } from './routes/event.js'; +import { followRoutes } from './routes/follow.js'; +import { nfcRoutes } from './routes/nfc.js'; +import { profileRoutes } from './routes/profiles.js'; +import { publicRoutes } from './routes/public.js'; import { validateEnv } from './utils/validateEnv.js'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -export async function buildApp() { +export async function buildApp():Promise { // Validate all required secrets before registering any plugin. // If validation fails the process exits here — no partially-initialised // auth state can exist because Fastify is not yet instantiated. @@ -93,7 +94,7 @@ export async function buildApp() { app.decorate('authenticate', async function (request: any, reply: any) { try { await request.jwtVerify(); - } catch (err) { + } catch (_err) { reply.status(401).send({ error: 'Unauthorized' }); } }); From fc426c937a9c882c403de70eac0f6af173984c33 Mon Sep 17 00:00:00 2001 From: Harxhit Date: Tue, 2 Jun 2026 01:05:49 +0530 Subject: [PATCH 2/4] chores: checking workflow --- apps/backend/src/routes/profiles.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/backend/src/routes/profiles.ts b/apps/backend/src/routes/profiles.ts index 81026c74..e9d2b1a8 100644 --- a/apps/backend/src/routes/profiles.ts +++ b/apps/backend/src/routes/profiles.ts @@ -1,7 +1,6 @@ import type { FastifyInstance, FastifyRequest, FastifyReply } from 'fastify'; import { getProfileUrl } from '@devcard/shared'; import { updateProfileSchema, createLinkSchema, reorderLinksSchema } from '../utils/validators.js'; -import { getErrorMessage } from '../utils/error.util.js'; import * as profileService from '../services/profileService' // ── Response types ──────────────────────────────────────────────────────────── From 0c7938d9ff394912a0708ffa4cfd0f12f94e8d03 Mon Sep 17 00:00:00 2001 From: Harxhit Date: Tue, 2 Jun 2026 01:45:09 +0530 Subject: [PATCH 3/4] chores:Workflow test2 --- apps/backend/src/routes/profiles.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/apps/backend/src/routes/profiles.ts b/apps/backend/src/routes/profiles.ts index e9d2b1a8..f8a8bab9 100644 --- a/apps/backend/src/routes/profiles.ts +++ b/apps/backend/src/routes/profiles.ts @@ -7,18 +7,7 @@ import * as profileService from '../services/profileService' // Declared explicitly so the API contract is visible without tracing through // Prisma's generic return types. Follows the convention in public.ts. -type ProfileUpdateResponse = { - id: string; - email: string; - username: string; - displayName: string; - bio: string | null; - pronouns: string | null; - role: string | null; - company: string | null; - avatarUrl: string | null; - accentColor: string; -}; + export async function profileRoutes(app: FastifyInstance) { // All profile routes require auth From a6ced7b432c2d703ca0cc6db2b9866183d83a850 Mon Sep 17 00:00:00 2001 From: Harxhit Date: Tue, 2 Jun 2026 02:09:56 +0530 Subject: [PATCH 4/4] chores:test3 --- apps/backend/src/routes/profiles.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/backend/src/routes/profiles.ts b/apps/backend/src/routes/profiles.ts index f8a8bab9..f678cb30 100644 --- a/apps/backend/src/routes/profiles.ts +++ b/apps/backend/src/routes/profiles.ts @@ -3,9 +3,7 @@ import { getProfileUrl } from '@devcard/shared'; import { updateProfileSchema, createLinkSchema, reorderLinksSchema } from '../utils/validators.js'; import * as profileService from '../services/profileService' -// ── Response types ──────────────────────────────────────────────────────────── -// Declared explicitly so the API contract is visible without tracing through -// Prisma's generic return types. Follows the convention in public.ts. +