first commit

This commit is contained in:
lendry
2026-06-24 14:37:15 +03:00
commit 995adeedd4
188 changed files with 28810 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import { Controller, Get } from '@nestjs/common';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { map } from 'rxjs';
import { CoreGrpcService } from '../core-grpc.service';
@ApiTags('Публичные настройки')
@Controller('settings')
export class PublicSettingsController {
constructor(private readonly core: CoreGrpcService) {}
@Get('public')
@ApiOperation({ summary: 'Публичные настройки', description: 'Возвращает несекретные настройки для интерфейса без авторизации.' })
listPublic() {
return this.core.settings.ListPublicSettings({}).pipe(
map((response) => {
const payload = response as { settings?: Array<{ key: string; value: string }> };
return { settings: payload.settings ?? [] };
})
);
}
}