diff --git a/apps/api/v1/index.ts b/apps/api/v1/index.ts index bfbd6f28..bf9659c9 100644 --- a/apps/api/v1/index.ts +++ b/apps/api/v1/index.ts @@ -9,10 +9,10 @@ import usersApp from './routes/users' import walletsApp from './routes/wallets' export const hono = new Hono() - .route('/exchange-rates', exchangeRatesApp) - .use('*', authMiddleware) + .route('/exchange-rates', exchangeRatesApp) + .route('/auth', authApp) .route('/budgets', budgetsApp) .route('/categories', categoriesApp) diff --git a/apps/api/v1/routes/exchange-rates.ts b/apps/api/v1/routes/exchange-rates.ts index 1d9b271f..5d773383 100644 --- a/apps/api/v1/routes/exchange-rates.ts +++ b/apps/api/v1/routes/exchange-rates.ts @@ -7,15 +7,16 @@ import { } from '../services/exchange-rates.service' const router = new Hono() - .use(async (c, next) => { - const apiKey = c.req.header('x-api-key') + // TODO: Enable this later + // .use(async (c, next) => { + // const apiKey = c.req.header('x-api-key') - if (!apiKey || apiKey !== process.env.API_SECRET_KEY) { - return c.json({ message: 'Unauthorized' }, 401) - } + // if (!apiKey || apiKey !== process.env.API_SECRET_KEY) { + // return c.json({ message: 'Unauthorized' }, 401) + // } - await next() - }) + // await next() + // }) .get( '/',