Merge pull request #1122 from Hexastack/1121-bug---base-repository-event-classname-format
Some checks are pending
Build and Push Docker API Image / build-and-push (push) Waiting to run
Build and Push Docker Base Image / build-and-push (push) Waiting to run
Build and Push Docker UI Image / build-and-push (push) Waiting to run

fix(api): resolve camelCased classname
This commit is contained in:
Med Marrouchi 2025-06-12 17:22:36 +01:00 committed by GitHub
commit ed31c7fa80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,6 +37,7 @@ import {
} from '@/utils/types/filter.types';
import { flatten } from '../helpers/flatten';
import { camelCase } from '../helpers/misc';
import { PageQueryDto, QuerySortDto } from '../pagination/pagination-query.dto';
import { DtoAction, DtoConfig, DtoInfer } from '../types/dto.types';
@ -128,7 +129,7 @@ export abstract class BaseRepository<
* @returns A type-safe event name string.
*/
getEventName(suffix: EHook) {
const entity = this.cls.name.toLocaleLowerCase();
const entity = camelCase(this.cls.name);
return `hook:${entity}:${suffix}` as `hook:${IHookEntities}:${TNormalizedEvents}`;
}