feat(routes): add more popular routes

This commit is contained in:
pseudoyu 2024-10-22 11:15:54 +08:00
parent 5dbc9931cd
commit 871ae0832f
No known key found for this signature in database
3 changed files with 8 additions and 5 deletions

View File

@ -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: {

View File

@ -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: {

View File

@ -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",