Initial Mento CRM: portal OTP, reports, SMS, and deploy for crm.montzar.ir.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-29 21:06:30 +03:30
co-authored by Cursor
commit 29a040c21d
195 changed files with 39430 additions and 0 deletions
@@ -0,0 +1,35 @@
import { Body, Controller, Get, Patch, UseGuards } from '@nestjs/common';
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
import { RolesGuard } from '../auth/roles.guard';
import { Roles } from '../auth/roles.decorator';
import { CurrentUser } from '../auth/current-user.decorator';
import { UpdateOrgCurrenciesDto } from './dto';
import { OrganizationsService } from './organizations.service';
@Controller('organizations')
@UseGuards(JwtAuthGuard, RolesGuard)
export class OrganizationsController {
constructor(private readonly organizationsService: OrganizationsService) {}
@Get('current')
current(@CurrentUser() user: { organizationId: string }) {
return this.organizationsService.getCurrent(user.organizationId);
}
@Get('currency-catalog')
catalog() {
return this.organizationsService.catalog();
}
@Patch('current/currencies')
@Roles('owner', 'admin')
updateCurrencies(
@CurrentUser() user: { organizationId: string },
@Body() dto: UpdateOrgCurrenciesDto,
) {
return this.organizationsService.updateCurrencies(
user.organizationId,
dto,
);
}
}