Spaces:
Runtime error
Runtime error
| import { Controller, Get } from '@nestjs/common'; | |
| import { ApiOperation, ApiSecurity, ApiTags } from '@nestjs/swagger'; | |
| import { LOCALE_NAMES } from '@waha/apps/chatwoot/locale'; | |
| interface LanguageResponse { | |
| name: string; | |
| locale: string; | |
| } | |
| ('api/apps/chatwoot') | |
| ('api_key') | |
| ('🧩 Apps') | |
| export class ChatwootLocalesController { | |
| ('locales') | |
| ({ | |
| summary: 'Get available languages for Chatwoot app', | |
| description: 'Get available languages for Chatwoot app', | |
| }) | |
| getLanguages(): LanguageResponse[] { | |
| return Array.from(LOCALE_NAMES.entries()).map(([locale, name]) => ({ | |
| name, | |
| locale, | |
| })); | |
| } | |
| } | |