chore: apply ESLint auto-fix across entire backend
Build and Push Multi-Platform Images / build-and-push (push) Successful in 41s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 41s
Reformats code style (line breaks, indentation, type annotations) without changing logic. Also includes minor feature additions bundled in the same lint run (stats service, user-settings groups, agrarmonitor polling improvements). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,17 +28,24 @@ export class InboxMigrationService implements OnApplicationBootstrap {
|
||||
@InjectRepository(InboxDocument)
|
||||
private readonly documentRepo: Repository<InboxDocument>,
|
||||
) {
|
||||
this.legacyRoot = this.configService.get<string>('SCANS_DATA_DIR', '/mnt/data/scans');
|
||||
this.legacyRoot = this.configService.get<string>(
|
||||
'SCANS_DATA_DIR',
|
||||
'/mnt/data/scans',
|
||||
);
|
||||
}
|
||||
|
||||
async onApplicationBootstrap(): Promise<void> {
|
||||
let subdirs: string[];
|
||||
try {
|
||||
const entries = await fs.readdir(this.legacyRoot, { withFileTypes: true });
|
||||
const entries = await fs.readdir(this.legacyRoot, {
|
||||
withFileTypes: true,
|
||||
});
|
||||
subdirs = entries.filter((e) => e.isDirectory()).map((e) => e.name);
|
||||
} catch (err: any) {
|
||||
if (err.code !== 'ENOENT') {
|
||||
this.logger.warn(`Migration: ${this.legacyRoot} nicht lesbar: ${err.message}`);
|
||||
this.logger.warn(
|
||||
`Migration: ${this.legacyRoot} nicht lesbar: ${err.message}`,
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -61,7 +68,9 @@ export class InboxMigrationService implements OnApplicationBootstrap {
|
||||
await this.migrateFile(src, subdir, name);
|
||||
migrated += 1;
|
||||
} catch (err: any) {
|
||||
this.logger.error(`Migration fehlgeschlagen (${src}): ${err.message}`);
|
||||
this.logger.error(
|
||||
`Migration fehlgeschlagen (${src}): ${err.message}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +84,11 @@ export class InboxMigrationService implements OnApplicationBootstrap {
|
||||
}
|
||||
}
|
||||
|
||||
private async migrateFile(src: string, subdir: string, name: string): Promise<void> {
|
||||
private async migrateFile(
|
||||
src: string,
|
||||
subdir: string,
|
||||
name: string,
|
||||
): Promise<void> {
|
||||
const id = randomUUID();
|
||||
const source: InboxSource = subdir === 'all' ? 'all' : 'user';
|
||||
const owner = source === 'all' ? null : subdir;
|
||||
@@ -115,7 +128,9 @@ export class InboxMigrationService implements OnApplicationBootstrap {
|
||||
}
|
||||
}
|
||||
|
||||
private async loadLegacyQrCodes(oldFilePath: string): Promise<StoredQrCode[]> {
|
||||
private async loadLegacyQrCodes(
|
||||
oldFilePath: string,
|
||||
): Promise<StoredQrCode[]> {
|
||||
try {
|
||||
const rows = await this.dataSource.query<LegacyScanRow[]>(
|
||||
'SELECT QrCodes FROM barcode_scans WHERE FilePath = ? LIMIT 1',
|
||||
|
||||
Reference in New Issue
Block a user