From 5114baf6842d23f112f5d91d2be0b6734bbd82cb Mon Sep 17 00:00:00 2001 From: kirinnee Date: Thu, 29 Feb 2024 10:51:53 +0800 Subject: [PATCH] fix: incorrect transformer annotations --- src/config/populator.config.ts | 4 ++-- src/config/watcher.config.ts | 4 ++-- src/index.ts | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/config/populator.config.ts b/src/config/populator.config.ts index 09a0bae..00d36d3 100644 --- a/src/config/populator.config.ts +++ b/src/config/populator.config.ts @@ -1,7 +1,7 @@ -import { IsInt, IsPositive } from "class-validator"; +import { IsNumber, IsPositive } from "class-validator"; export class PopulatorConfig { - @IsInt() + @IsNumber() @IsPositive() delay: number; } diff --git a/src/config/watcher.config.ts b/src/config/watcher.config.ts index 2b51fe0..b167643 100644 --- a/src/config/watcher.config.ts +++ b/src/config/watcher.config.ts @@ -1,7 +1,7 @@ -import { IsInt, IsPositive } from "class-validator"; +import { IsNumber, IsPositive } from "class-validator"; export class WatcherConfig { - @IsInt() + @IsNumber() @IsPositive() delay: number; } diff --git a/src/index.ts b/src/index.ts index f1dc3af..98ef04e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -43,6 +43,7 @@ const detailFactory = new DetailFactory(cfg.error, cfg.app); const utility = new Utility(detailFactory); const watcher = new Watcher( + cfg.app.watcher, logger, caches.get("live")!, searchBuilder, @@ -51,7 +52,7 @@ const watcher = new Watcher( const getter = new Get(searchBuilder); const zinc = loadZinc(cfg.zinc, auth); const checker = new Checker(zinc, utility, zincDate); -const populator = new Populator(logger, searchBuilder); +const populator = new Populator(cfg.app.populator, logger, searchBuilder); const updater = new Updater( zinc, utility,