Add Telegram ownership for voice reviews
All checks were successful
Build and deploy Backend / build (push) Successful in 1m1s
All checks were successful
Build and deploy Backend / build (push) Successful in 1m1s
This commit is contained in:
@@ -12,7 +12,10 @@ export type CreateVoiceExperienceInput = {
|
||||
audioObjectKey: string;
|
||||
};
|
||||
|
||||
export async function createVoiceExperience(input: CreateVoiceExperienceInput) {
|
||||
export async function createVoiceExperience(
|
||||
input: CreateVoiceExperienceInput,
|
||||
userId: string,
|
||||
) {
|
||||
if (input.durationSeconds < minimumVoiceExperienceSeconds) {
|
||||
throw new Error('Voice experience must be at least 30 seconds.');
|
||||
}
|
||||
@@ -35,11 +38,12 @@ export async function createVoiceExperience(input: CreateVoiceExperienceInput) {
|
||||
const experience = await prisma.voiceExperience.create({
|
||||
data: {
|
||||
placeId: place.id,
|
||||
userId,
|
||||
durationSeconds: input.durationSeconds,
|
||||
audioObjectKey: input.audioObjectKey,
|
||||
status: 'UPLOADED',
|
||||
},
|
||||
include: { place: true },
|
||||
include: { place: true, user: true },
|
||||
});
|
||||
|
||||
await enqueueVoiceExperience({ experienceId: experience.id });
|
||||
|
||||
Reference in New Issue
Block a user