Performing logins, mobile cards, and other tasks

This commit is contained in:
2026-07-16 16:48:13 +03:30
parent 61c8653af6
commit 67506e2d98
5 changed files with 89 additions and 0 deletions
@@ -27,6 +27,7 @@ import { AssignBusinessOwnerDto } from './dto/assign-business-owner.dto';
import { CreateBusinessDto } from './dto/create-business.dto';
import { SetAvailabilityDto } from './dto/set-availability.dto';
import { UpdateBusinessDto } from './dto/update-business.dto';
import { sanitizeBusinessHighlightKeys } from '../../common/constants/business-highlights';
type FindAllFilters = {
categoryId?: string;
@@ -165,6 +166,11 @@ export class BusinessesService {
Object.assign(business, payload);
if (payload.heroHighlightKeys !== undefined) {
const sanitized = sanitizeBusinessHighlightKeys(payload.heroHighlightKeys);
business.heroHighlightKeys = sanitized.length ? sanitized : null;
}
if (business.promoDiscountEnabled) {
if (
!business.promoDiscountPercent ||