Skip to content

Commit

Permalink
fix: resolve __dirname error
Browse files Browse the repository at this point in the history
Signed-off-by: mintyfrankie <[email protected]>
  • Loading branch information
mintyfrankie committed Dec 17, 2024
1 parent 20e1176 commit 707b5df
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/routes/hiringcafe/jobs.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Route } from '@/types';
import ofetch from '@/utils/ofetch';
import path from 'node:path';
import { art } from '@/utils/render';
import { Context } from 'hono';
import path from 'node:path';
import { getCurrentPath } from '@/utils/helpers';
import { Route } from '@/types';

const __dirname = getCurrentPath(import.meta.url);

interface GeoLocation {
lat: number;
Expand Down Expand Up @@ -54,7 +57,7 @@ const ALGOLIA_API_KEY = '360c8026d33e372e6b37d18b177f7df5';
const ALGOLIA_BASE_URL = 'https://8hemfgmpst-1.algolianet.com/1/indexes/*/queries';
const ALGOLIA_INDEX_NAME = 'V2_Marketplace_Jobs';

const renderJobDescription = (jobInfo, processedData) =>
const renderJobDescription = (jobInfo: JobInformation, processedData: ProcessedJobData) =>
art(path.join(__dirname, 'templates/jobs.art'), {
company_name: processedData.company_name,
location: jobInfo.location,
Expand Down

0 comments on commit 707b5df

Please sign in to comment.