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:
@@ -1,4 +1,12 @@
|
||||
import { Body, Controller, Get, HttpCode, Post, Put, Request } from '@nestjs/common';
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Get,
|
||||
HttpCode,
|
||||
Post,
|
||||
Put,
|
||||
Request,
|
||||
} from '@nestjs/common';
|
||||
import { UserSettingsService } from './user-settings.service';
|
||||
import { RequirePermissions } from '../auth/permissions.decorator';
|
||||
import { Permission } from '../auth/permissions.enum';
|
||||
@@ -9,12 +17,23 @@ export class UserSettingsController {
|
||||
|
||||
@Get()
|
||||
async getSettings(@Request() req: any) {
|
||||
return this.userSettingsService.getSettings(req.user.userId, req.user.email, req.user.preferredUsername, req.user.groups);
|
||||
return this.userSettingsService.getSettings(
|
||||
req.user.userId,
|
||||
req.user.email,
|
||||
req.user.preferredUsername,
|
||||
req.user.groups,
|
||||
);
|
||||
}
|
||||
|
||||
@Put()
|
||||
async updateSettings(@Request() req: any, @Body() body: any) {
|
||||
return this.userSettingsService.updateSettings(req.user.userId, body, req.user.email, req.user.preferredUsername, req.user.groups);
|
||||
return this.userSettingsService.updateSettings(
|
||||
req.user.userId,
|
||||
body,
|
||||
req.user.email,
|
||||
req.user.preferredUsername,
|
||||
req.user.groups,
|
||||
);
|
||||
}
|
||||
|
||||
@Get('senders')
|
||||
@@ -25,7 +44,16 @@ export class UserSettingsController {
|
||||
@Post('test-smtp')
|
||||
@HttpCode(200)
|
||||
@RequirePermissions(Permission.MANAGE_SETTINGS)
|
||||
async testSmtp(@Body() body: { host: string; port: number; secure: boolean; user: string; pass: string }) {
|
||||
async testSmtp(
|
||||
@Body()
|
||||
body: {
|
||||
host: string;
|
||||
port: number;
|
||||
secure: boolean;
|
||||
user: string;
|
||||
pass: string;
|
||||
},
|
||||
) {
|
||||
return this.userSettingsService.testSmtp(body);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user