mirror of
https://github.com/strapi/strapi.git
synced 2025-12-29 16:16:20 +00:00
Fix routes
This commit is contained in:
parent
082cde5874
commit
361b318f91
@ -1,8 +1,15 @@
|
||||
import type { Common } from '../../..';
|
||||
// import { Router } from '../../../../core-api';
|
||||
|
||||
export interface Routes {
|
||||
// TODO: Make RouteInput a generic that enforces the route type (either undefined or matching the RouteType key here)
|
||||
'content-api'?: Common.RouteInput[] | (() => Common.RouteInput[]); // TODO: Should this be Router.Router & { type: 'content-api' }; ?
|
||||
admin?: Common.RouteInput[] | (() => Common.RouteInput[]); // TODO: Should this be Router.Router & { type: 'admin' }; ?
|
||||
export type ArrayNotation = Common.RouteInput[];
|
||||
|
||||
export interface ObjectNotation {
|
||||
routes: Common.RouteInput[];
|
||||
type?: Common.RouterType;
|
||||
}
|
||||
|
||||
export interface NamedRoutes {
|
||||
[key: string]: ObjectNotation;
|
||||
}
|
||||
|
||||
export type Routes = ArrayNotation | NamedRoutes;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user