Skip to content

Commit

Permalink
refactor(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 4031faf commit 2724169
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ VITE_AUTH_ROUTE_MODE=static
VITE_ROUTE_HOME=home

# default menu icon
VITE_MENU_ICON=mdi:menu
VITE_MENU_ICON=mdi:menu
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 } });
}

1 comment on commit 2724169

@vercel
Copy link

@vercel vercel bot commented on 2724169 Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

soybean-admin – ./

soybean-admin-eta.vercel.app
soybean-admin-soybeanjs.vercel.app
soybean-admin-git-main-soybeanjs.vercel.app

Please sign in to comment.