Skip to content

Commit

Permalink
fix(graphql): enforce user to be provided when createTranscript
Browse files Browse the repository at this point in the history
  • Loading branch information
MrOrz committed Aug 28, 2023
1 parent 2d6e4b1 commit 0e89d66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/graphql/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,11 @@ const imageAnnotator = new ImageAnnotatorClient();
/**
* @param {object} queryInfo - contains type and media entry ID of contents after fileUrl
* @param {string} fileUrl - the audio, image or video file to process
* @param {object} user - the user who requested the transcription
*/
export async function createTranscript(queryInfo, fileUrl, user) {
if (!user) throw new Error('[createTranscript] user is required');

const update = createAIResponse({
user,
type: 'TRANSCRIPT',
Expand Down

0 comments on commit 0e89d66

Please sign in to comment.