1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-06 06:07:29 +02:00

fix(server): validation events actually throwing an error (#8172)

* fix validation events

* add e2e test
This commit is contained in:
Daniel Dietzler
2024-03-21 23:59:21 +01:00
committed by GitHub
parent 508f32c08a
commit d6823b128c
5 changed files with 36 additions and 8 deletions

View File

@ -1,4 +1,6 @@
import { SetMetadata } from '@nestjs/common';
import { OnEvent, OnEventType } from '@nestjs/event-emitter';
import { OnEventOptions } from '@nestjs/event-emitter/dist/interfaces';
import _ from 'lodash';
import { setUnion } from 'src/utils/set';
@ -122,3 +124,6 @@ export interface GenerateSqlQueries {
/** Decorator to enable versioning/tracking of generated Sql */
export const GenerateSql = (...options: GenerateSqlQueries[]) => SetMetadata(GENERATE_SQL_KEY, options);
export const OnEventInternal = (event: OnEventType, options?: OnEventOptions) =>
OnEvent(event, { suppressErrors: false, ...options });