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