mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(server): notification events (#10754)
This commit is contained in:
parent
0b88bef157
commit
81d12c0586
10 changed files with 92 additions and 69 deletions
|
|
@ -22,7 +22,7 @@ import { LibraryEntity } from 'src/entities/library.entity';
|
|||
import { IAssetRepository, WithProperty } from 'src/interfaces/asset.interface';
|
||||
import { ICryptoRepository } from 'src/interfaces/crypto.interface';
|
||||
import { DatabaseLock, IDatabaseRepository } from 'src/interfaces/database.interface';
|
||||
import { OnEvents, SystemConfigUpdate } from 'src/interfaces/event.interface';
|
||||
import { OnEvents, SystemConfigUpdateEvent } from 'src/interfaces/event.interface';
|
||||
import {
|
||||
IBaseJob,
|
||||
IEntityJob,
|
||||
|
|
@ -102,7 +102,7 @@ export class LibraryService implements OnEvents {
|
|||
});
|
||||
}
|
||||
|
||||
onConfigValidateEvent({ newConfig }: SystemConfigUpdate) {
|
||||
onConfigValidateEvent({ newConfig }: SystemConfigUpdateEvent) {
|
||||
const { scan } = newConfig.library;
|
||||
if (!validateCronExpression(scan.cronExpression)) {
|
||||
throw new Error(`Invalid cron expression ${scan.cronExpression}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue