Skip to content

Commit

Permalink
chore(projects): update mock api
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Jan 26, 2024
1 parent dca53b0 commit c007935
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/service/api/route.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
import { request } from '../request';

/**
* Get user routes
*
* @param example Whether to use example data, default: 0
*/
export function fetchGetUserRoutes(example: '0' | '1' = '0') {
return request<Api.Route.UserRoute>({ url: '/route/getUserRoutes', params: { example } });
/** get user routes */
export function fetchGetUserRoutes() {
return request<Api.Route.UserRoute>({ url: '/route/getUserRoutes' });
}

/**
* Whether the route is exist
* whether the route is exist
*
* @param routeName Route name
* @param example Whether to use example data, default: 0
* @param routeName route name
*/
export function fetchIsRouteExist(routeName: string, example: '0' | '1' = '0') {
return request<boolean>({ url: '/route/isRouteExist', params: { routeName, example } });
export function fetchIsRouteExist(routeName: string) {
return request<boolean>({ url: '/route/isRouteExist', params: { routeName } });
}

0 comments on commit c007935

Please sign in to comment.