Skip to content

Commit

Permalink
Merge ec56a24 into 3773574
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelyali committed Dec 25, 2018
2 parents 3773574 + ec56a24 commit 0f301ca
Show file tree
Hide file tree
Showing 34 changed files with 1,571 additions and 4,326 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ install:
- npm i

script:
- npm run test:e2e | coveralls
- npm run test:e2e -- --coverageReporters=text-lcov | coveralls
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ _Status codes:_ 200 | 404
- [**`sort`**](#sort) (alias: `sort[]`) - sort GET result by some `field` in `ASC | DESC` order
- [**`join`**](#join) (alias: `join[]`) - receive joined relational entities in GET result (with all or selected fields)
- [**`limit`**](#limit) (alias `per_page`) - receive `N` amount of entities
- [**`offset`**](#offset) (alias `skip`) - offset `N` amount of entities
- [**`offset`**](#offset) - offset `N` amount of entities
- [**`page`**](#page) - receive a portion of `limit` (`per_page`) entities (alternative to `offset`)
- [**`cache`**](#cache) - reset cache (if was enabled) and receive entities from the DB

Expand Down Expand Up @@ -816,11 +816,14 @@ enum CrudActions {
`ACLGuard` dummy example:

```typescript
import { Reflector } from '@nestjs/core';
import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common';
import { FEAUTURE_NAME_METADATA, ACTION_NAME_METADATA } from '@nestjsx/crud';

@Injectable()
export class ACLGuard implements CanActivate {
constructor(private reflector: Reflector) {}

canActivate(ctx: ExecutionContext): boolean {
const handler = ctx.getHandler();
const controller = ctx.getClass();
Expand Down
5 changes: 4 additions & 1 deletion dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ _Status codes:_ 200 | 404
- [**`sort`**](#sort) (alias: `sort[]`) - sort GET result by some `field` in `ASC | DESC` order
- [**`join`**](#join) (alias: `join[]`) - receive joined relational entities in GET result (with all or selected fields)
- [**`limit`**](#limit) (alias `per_page`) - receive `N` amount of entities
- [**`offset`**](#offset) (alias `skip`) - offset `N` amount of entities
- [**`offset`**](#offset) - offset `N` amount of entities
- [**`page`**](#page) - receive a portion of `limit` (`per_page`) entities (alternative to `offset`)
- [**`cache`**](#cache) - reset cache (if was enabled) and receive entities from the DB

Expand Down Expand Up @@ -816,11 +816,14 @@ enum CrudActions {
`ACLGuard` dummy example:

```typescript
import { Reflector } from '@nestjs/core';
import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common';
import { FEAUTURE_NAME_METADATA, ACTION_NAME_METADATA } from '@nestjsx/crud';

@Injectable()
export class ACLGuard implements CanActivate {
constructor(private reflector: Reflector) {}

canActivate(ctx: ExecutionContext): boolean {
const handler = ctx.getHandler();
const controller = ctx.getClass();
Expand Down
8 changes: 3 additions & 5 deletions dist/decorators/crud.decorator.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { ValidationPipeOptions } from '@nestjs/common';
interface CrudOptions {
validation?: ValidationPipeOptions;
}
import { CrudOptions } from '../interfaces';
declare type BaseRouteName = 'getManyBase' | 'getOneBase' | 'createOneBase' | 'createManyBase' | 'updateOneBase' | 'deleteOneBase';
export declare const Crud: (dto: any, crudOptions?: CrudOptions) => (target: object) => void;
export declare const Override: (name?: "getManyBase" | "getOneBase" | "createOneBase" | "updateOneBase" | "deleteOneBase") => (target: any, key: any, descriptor: PropertyDescriptor) => PropertyDescriptor;
export declare const Override: (name?: BaseRouteName) => (target: any, key: any, descriptor: PropertyDescriptor) => PropertyDescriptor;
export {};
183 changes: 74 additions & 109 deletions dist/decorators/crud.decorator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0f301ca

Please sign in to comment.