mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-12-15 09:49:54 +03:00
feat: add new @Update decorator
This commit is contained in:
8
lib/decorators/update.decorator.ts
Normal file
8
lib/decorators/update.decorator.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { SetMetadata } from '@nestjs/common';
|
||||
import { DECORATORS } from '../telegraf.constants';
|
||||
|
||||
/**
|
||||
* `@Update` decorator, it's like NestJS `@Controller` decorator,
|
||||
* only for Telegram Bot API updates.
|
||||
*/
|
||||
export const Update = (): ClassDecorator => SetMetadata(DECORATORS.UPDATE, {});
|
||||
Reference in New Issue
Block a user