Lower voice experience minimum duration
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { enqueueVoiceExperience } from '../hatchet/enqueue-voice-experience.js';
|
||||
import { prisma } from '../prisma.js';
|
||||
|
||||
const minimumVoiceExperienceSeconds = 30;
|
||||
|
||||
export type CreateVoiceExperienceInput = {
|
||||
googlePlaceId: string;
|
||||
googleName: string;
|
||||
@@ -11,8 +13,8 @@ export type CreateVoiceExperienceInput = {
|
||||
};
|
||||
|
||||
export async function createVoiceExperience(input: CreateVoiceExperienceInput) {
|
||||
if (input.durationSeconds < 60) {
|
||||
throw new Error('Voice experience must be at least 60 seconds.');
|
||||
if (input.durationSeconds < minimumVoiceExperienceSeconds) {
|
||||
throw new Error('Voice experience must be at least 30 seconds.');
|
||||
}
|
||||
|
||||
const place = await prisma.place.upsert({
|
||||
|
||||
Reference in New Issue
Block a user