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:
@@ -29,16 +29,38 @@ export class AgrarmonitorService {
|
||||
async getClient(): Promise<AgrarmonitorConnectorResult> {
|
||||
if (this.client) return this.client;
|
||||
|
||||
const username = this.configService.get<string>('AGRARMONITOR_USERNAME', '');
|
||||
const password = this.configService.get<string>('AGRARMONITOR_PASSWORD', '');
|
||||
const baseUrl = this.configService.get<string>('AGRARMONITOR_BASE_URL', 'https://admin7.agrarmonitor.de');
|
||||
const apiBaseUrl = this.configService.get<string>('AGRARMONITOR_API_BASE_URL', 'https://api.agrarmonitor.de');
|
||||
const username = this.configService.get<string>(
|
||||
'AGRARMONITOR_USERNAME',
|
||||
'',
|
||||
);
|
||||
const password = this.configService.get<string>(
|
||||
'AGRARMONITOR_PASSWORD',
|
||||
'',
|
||||
);
|
||||
const baseUrl = this.configService.get<string>(
|
||||
'AGRARMONITOR_BASE_URL',
|
||||
'https://admin7.agrarmonitor.de',
|
||||
);
|
||||
const apiBaseUrl = this.configService.get<string>(
|
||||
'AGRARMONITOR_API_BASE_URL',
|
||||
'https://api.agrarmonitor.de',
|
||||
);
|
||||
const apiToken = this.configService.get<string>('AGRARMONITOR_API_TOKEN');
|
||||
const cookiePath = this.configService.get<string>('AGRARMONITOR_COOKIE_PATH', './data/agrarmonitor-cookies.json');
|
||||
const encryptionKey = this.configService.get<string>('AGRARMONITOR_ENCRYPTION_KEY');
|
||||
const cookiePath = this.configService.get<string>(
|
||||
'AGRARMONITOR_COOKIE_PATH',
|
||||
'./data/agrarmonitor-cookies.json',
|
||||
);
|
||||
const encryptionKey = this.configService.get<string>(
|
||||
'AGRARMONITOR_ENCRYPTION_KEY',
|
||||
);
|
||||
|
||||
const encryptor = encryptionKey ? new AesGcmCookieEncryptor(encryptionKey) : undefined;
|
||||
const cookieStore = new FileCookieStore(cookiePath, { encryptor, logger: this.logger });
|
||||
const encryptor = encryptionKey
|
||||
? new AesGcmCookieEncryptor(encryptionKey)
|
||||
: undefined;
|
||||
const cookieStore = new FileCookieStore(cookiePath, {
|
||||
encryptor,
|
||||
logger: this.logger,
|
||||
});
|
||||
|
||||
this.client = await createAgrarmonitorClient({
|
||||
baseUrl,
|
||||
@@ -84,7 +106,10 @@ export class AgrarmonitorService {
|
||||
}
|
||||
}
|
||||
|
||||
async registerDevice(pcName: string, agrarmonitorId: string): Promise<AgrarmonitorRegisterResultDto> {
|
||||
async registerDevice(
|
||||
pcName: string,
|
||||
agrarmonitorId: string,
|
||||
): Promise<AgrarmonitorRegisterResultDto> {
|
||||
const client = await this.getClient();
|
||||
const result = await client.registerDevice({ agrarmonitorId, pcName });
|
||||
return { success: result.success, message: result.message };
|
||||
|
||||
Reference in New Issue
Block a user