From 871ae0832f5f7b99646c496da47f445f0cebbfa7 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Tue, 22 Oct 2024 11:15:54 +0800 Subject: [PATCH] feat(routes): add more popular routes --- lib/routes/bsky/posts.ts | 3 ++- lib/routes/gettr/user.ts | 5 +++-- lib/routes/linkedin/jobs.ts | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/routes/bsky/posts.ts b/lib/routes/bsky/posts.ts index 24f6d124c..41b5e7c00 100644 --- a/lib/routes/bsky/posts.ts +++ b/lib/routes/bsky/posts.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,6 +11,7 @@ import path from 'node:path'; export const route: Route = { path: '/profile/:handle', categories: ['social-media', 'popular'], + view: ViewType.SocialMedia, example: '/bsky/profile/bsky.app', parameters: { handle: 'User handle, can be found in URL' }, features: { diff --git a/lib/routes/gettr/user.ts b/lib/routes/gettr/user.ts index a4ee40a3c..b1c9c7726 100644 --- a/lib/routes/gettr/user.ts +++ b/lib/routes/gettr/user.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -15,7 +15,8 @@ const actionMap = { export const route: Route = { path: '/user/:id', - categories: ['social-media'], + categories: ['social-media', 'popular'], + view: ViewType.SocialMedia, example: '/gettr/user/jasonmillerindc', parameters: { id: 'User id' }, features: { diff --git a/lib/routes/linkedin/jobs.ts b/lib/routes/linkedin/jobs.ts index 9b87514c3..ea60be49b 100644 --- a/lib/routes/linkedin/jobs.ts +++ b/lib/routes/linkedin/jobs.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import { EXP_LEVELS, EXP_LEVELS_QUERY_KEY, JOB_TYPES, JOB_TYPES_QUERY_KEY, KEYWORDS_QUERY_KEY, parseJobSearch, parseParamsToSearchParams, parseParamsToString, parseRouteParam } from './utils'; @@ -8,7 +8,8 @@ const JOB_SEARCH_PATH = '/jobs-guest/jobs/api/seeMoreJobPostings/search'; export const route: Route = { path: '/jobs/:job_types/:exp_levels/:keywords?/:routeParams?', - categories: ['social-media'], + categories: ['social-media', 'popular'], + view: ViewType.Notifications, example: '/linkedin/jobs/C-P/1/software engineer', parameters: { job_types: "See the following table for details, use '-' as delimiter",