Performing logins, mobile cards, and other tasks
This commit is contained in:
@@ -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 ||
|
||||
|
||||
Reference in New Issue
Block a user