@sigmaott/core
TypeScript icon, indicating that this package has built-in type declarations

1.2.28 • Public • Published

@sigmaott/core

Package chứa các code nền tảng hệ thống @sigmaott

Usage

Audit-log Interceptor

Ghi lại log dữ liệu hành vi người dùng sử dụng tài nguyên. Sử dụng với các hàm xử lý liên quan đến thay đổi dữ liệu như

  • POST
  • PUT
  • PATCH
  • DELETE

example

import { UseInterceptors } from '@sigmaott/core';

@Post()
@UseInterceptors(new AuditLogInterceptor('[Transcode] Create Channel', {requestBody: true, responseBody: true}))
async createChannel(
  @Body() createChannelDto: CreateChannelDto,
): Promise<any> {
  return this._channelService.createChannel(appId, createChannelDto);
}

options:

  • requestBody: có hiển thị requestBody ở log không
    • default: true
    • disable nếu requestBody quá to, không quan trọng, hoặc không phải là JSON
  • responseBody: có hiển thị responseBody ở log không
    • default: true
    • disable nếu responseBody quá to, không quan trọng, hoặc không phải là JSON

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.28
    36
    • latest

Version History

Package Sidebar

Install

npm i @sigmaott/core

Weekly Downloads

109

Version

1.2.28

License

ISC

Unpacked Size

277 kB

Total Files

132

Last publish

Collaborators

  • phongthien
  • tiennv173
  • vietanha34