Track client and server sources

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-23 12:04:01 +03:00
parent d9f7603ae8
commit de9dd05308
383 changed files with 44782 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
import { PipeTransform, BadRequestException } from '@nestjs/common'
import { MAX_INT64 } from '../constants/db.constants'
import { ChannelId } from '../types/channel-id.type'
export class ParseChannelIdPipe implements PipeTransform<string, ChannelId> {
transform(value: string): ChannelId {
let id: ChannelId
try {
id = ChannelId(value)
} catch {
throw new BadRequestException('Invalid channel id')
}
if (id > MAX_INT64) {
throw new BadRequestException('Id is too large')
}
return id
}
}