Allow short voice experiences
All checks were successful
Build and deploy Backend / build (push) Successful in 33s
All checks were successful
Build and deploy Backend / build (push) Successful in 33s
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
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;
|
|
||||||
const forbiddenGeneratedPlaceIdPrefix = 'manual-';
|
const forbiddenGeneratedPlaceIdPrefix = 'manual-';
|
||||||
|
|
||||||
export type CreateVoiceExperienceInput = {
|
export type CreateVoiceExperienceInput = {
|
||||||
@@ -17,9 +16,6 @@ export async function createVoiceExperience(
|
|||||||
input: CreateVoiceExperienceInput,
|
input: CreateVoiceExperienceInput,
|
||||||
userId: string,
|
userId: string,
|
||||||
) {
|
) {
|
||||||
if (input.durationSeconds < minimumVoiceExperienceSeconds) {
|
|
||||||
throw new Error('Voice experience must be at least 30 seconds.');
|
|
||||||
}
|
|
||||||
const googlePlaceId = input.googlePlaceId.trim();
|
const googlePlaceId = input.googlePlaceId.trim();
|
||||||
const googleName = input.googleName.trim();
|
const googleName = input.googleName.trim();
|
||||||
if (googlePlaceId === '') {
|
if (googlePlaceId === '') {
|
||||||
|
|||||||
Reference in New Issue
Block a user