@adonisjs-community/girouette
Version:
An AdonisJS package allowing decorators-based routing.
22 lines (21 loc) • 742 B
TypeScript
import { ResourceActionNames } from '@adonisjs/core/types/http';
/**
* The `@Except` decorator specifies which CRUD methods should be excluded from the resource.
*
* @param names The CRUD methods to exclude from the resource
*
* @example
* ```ts
* @Resource('/posts', 'blog.posts')
* @Except(['create', 'show'])
* export default class PostsController {
* // Generates routes:
* // GET /posts (blog.posts.index)
* // POST /posts (blog.posts.store)
* // GET /posts/:id/edit (blog.posts.edit)
* // PUT /posts/:id (blog.posts.update)
* // DELETE /posts/:id (blog.posts.destroy)
* }
* ```
*/
export declare const Except: (names: ResourceActionNames[]) => (target: any) => void;