Revert "fix: resolve all ESLint errors in backend and frontend"
Build and Push Multi-Platform Images / build-and-push (push) Successful in 19s

This reverts commit 07dfd7e840.
This commit is contained in:
2026-06-16 16:19:11 +02:00
parent 14c11bf718
commit 66aeab282c
43 changed files with 204 additions and 399 deletions
+16 -21
View File
@@ -21,8 +21,6 @@ import { BarcodeScannerService } from '../barcode/barcode-scanner.service';
import { UserSettingsService } from '../user-settings/user-settings.service';
import { RequirePermissions } from '../auth/permissions.decorator';
import { Permission } from '../auth/permissions.enum';
import type { AuthenticatedRequest } from '../auth/authenticated-request';
import type { InboxSource } from '../database/entities/inbox-document.entity';
@Controller('api/inbox')
@RequirePermissions(Permission.VIEW_SCANNER)
@@ -35,7 +33,7 @@ export class InboxController {
) {}
@Get()
async list(@Request() req: AuthenticatedRequest) {
async list(@Request() req: any) {
const preferredUsername: string | null =
req.user?.preferredUsername ?? null;
return this.inboxService.listFiles(preferredUsername);
@@ -49,7 +47,7 @@ export class InboxController {
@Get(':id/preview')
async preview(
@Param('id') id: string,
@Request() req: AuthenticatedRequest,
@Request() req: any,
@Res({ passthrough: true }) res: Response,
): Promise<StreamableFile> {
const preferredUsername: string | null =
@@ -71,7 +69,7 @@ export class InboxController {
async pageThumbnail(
@Param('id') id: string,
@Param('page', ParseIntPipe) page: number,
@Request() req: AuthenticatedRequest,
@Request() req: any,
@Res({ passthrough: true }) res: Response,
): Promise<StreamableFile> {
const preferredUsername: string | null =
@@ -90,10 +88,7 @@ export class InboxController {
@Delete(':id')
@HttpCode(204)
async remove(
@Param('id') id: string,
@Request() req: AuthenticatedRequest,
): Promise<void> {
async remove(@Param('id') id: string, @Request() req: any): Promise<void> {
const preferredUsername: string | null =
req.user?.preferredUsername ?? null;
await this.inboxService.deleteDocument(id, preferredUsername);
@@ -104,7 +99,7 @@ export class InboxController {
async removePage(
@Param('id') id: string,
@Param('page', ParseIntPipe) page: number,
@Request() req: AuthenticatedRequest,
@Request() req: any,
): Promise<void> {
const preferredUsername: string | null =
req.user?.preferredUsername ?? null;
@@ -116,7 +111,7 @@ export class InboxController {
async toggleManualSplit(
@Param('id') id: string,
@Param('page', ParseIntPipe) page: number,
@Request() req: AuthenticatedRequest,
@Request() req: any,
): Promise<void> {
const preferredUsername: string | null =
req.user?.preferredUsername ?? null;
@@ -127,7 +122,7 @@ export class InboxController {
@HttpCode(204)
async resetEdits(
@Param('id') id: string,
@Request() req: AuthenticatedRequest,
@Request() req: any,
): Promise<void> {
const preferredUsername: string | null =
req.user?.preferredUsername ?? null;
@@ -137,7 +132,7 @@ export class InboxController {
@Post(':id/postprocess')
async postprocess(
@Param('id') id: string,
@Request() req: AuthenticatedRequest,
@Request() req: any,
@Body()
body: {
sectionOffset?: number;
@@ -163,7 +158,7 @@ export class InboxController {
@Param('id') id: string,
@Param('page', ParseIntPipe) page: number,
@Body() body: { rotation?: number },
@Request() req: AuthenticatedRequest,
@Request() req: any,
): Promise<void> {
const rotation = Number(body?.rotation);
if (!Number.isFinite(rotation)) {
@@ -183,7 +178,7 @@ export class InboxController {
async pagePreview(
@Param('id') id: string,
@Param('page', ParseIntPipe) page: number,
@Request() req: AuthenticatedRequest,
@Request() req: any,
@Res({ passthrough: true }) res: Response,
): Promise<StreamableFile> {
const preferredUsername: string | null =
@@ -205,7 +200,7 @@ export class InboxController {
@Param('id') id: string,
@Param('page', ParseIntPipe) page: number,
@Body() body: { x: number; y: number; w: number; h: number },
@Request() req: AuthenticatedRequest,
@Request() req: any,
): Promise<{ found: string[] }> {
const preferredUsername: string | null =
req.user?.preferredUsername ?? null;
@@ -224,8 +219,8 @@ export class InboxController {
@HttpCode(204)
async updateSource(
@Param('id') id: string,
@Body() body: { source: InboxSource },
@Request() req: AuthenticatedRequest,
@Body() body: { source: any },
@Request() req: any,
): Promise<void> {
const preferredUsername: string | null =
req.user?.preferredUsername ?? null;
@@ -236,7 +231,7 @@ export class InboxController {
async downloadSegment(
@Param('id') id: string,
@Body() body: { pages: number[] },
@Request() req: AuthenticatedRequest,
@Request() req: any,
@Res({ passthrough: true }) res: Response,
): Promise<StreamableFile> {
const preferredUsername: string | null =
@@ -268,13 +263,13 @@ export class InboxController {
segments: { pages: number[]; filename: string }[];
sender?: string;
},
@Request() req: AuthenticatedRequest,
@Request() req: any,
): Promise<void> {
const preferredUsername: string | null =
req.user?.preferredUsername ?? null;
const smtpOverride =
body.sender === 'user'
? await this.userSettingsService.getSmtpConfig(req.user!.userId)
? await this.userSettingsService.getSmtpConfig(req.user.userId)
: null;
await this.inboxService.sendAsEmail(id, preferredUsername, {
...body,