wip
This commit is contained in:
@@ -82,10 +82,10 @@ export class UpdateQuietHoursUseCase {
|
||||
async execute(command: UpdateQuietHoursCommand): Promise<void> {
|
||||
// Validate hours if provided
|
||||
if (command.startHour !== undefined && (command.startHour < 0 || command.startHour > 23)) {
|
||||
throw new Error('Start hour must be between 0 and 23');
|
||||
throw new NotificationDomainError('Start hour must be between 0 and 23');
|
||||
}
|
||||
if (command.endHour !== undefined && (command.endHour < 0 || command.endHour > 23)) {
|
||||
throw new Error('End hour must be between 0 and 23');
|
||||
throw new NotificationDomainError('End hour must be between 0 and 23');
|
||||
}
|
||||
|
||||
const preferences = await this.preferenceRepository.getOrCreateDefault(command.driverId);
|
||||
@@ -110,7 +110,7 @@ export class SetDigestModeUseCase {
|
||||
|
||||
async execute(command: SetDigestModeCommand): Promise<void> {
|
||||
if (command.frequencyHours !== undefined && command.frequencyHours < 1) {
|
||||
throw new Error('Digest frequency must be at least 1 hour');
|
||||
throw new NotificationDomainError('Digest frequency must be at least 1 hour');
|
||||
}
|
||||
|
||||
const preferences = await this.preferenceRepository.getOrCreateDefault(command.driverId);
|
||||
|
||||
Reference in New Issue
Block a user