Skip to content

Commit

Permalink
mp3_format_transferred_to_wav
Browse files Browse the repository at this point in the history
  • Loading branch information
golanguzb71 committed Oct 14, 2024
1 parent 409e069 commit ded2206
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api-gateway/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ const docTemplate = `{
},
{
"type": "file",
"description": "Voice Answer (only MP3)",
"description": "Voice Answer (only wav)",
"name": "voiceAnswer",
"in": "formData",
"required": true
Expand Down
2 changes: 1 addition & 1 deletion api-gateway/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@
},
{
"type": "file",
"description": "Voice Answer (only MP3)",
"description": "Voice Answer (only wav)",
"name": "voiceAnswer",
"in": "formData",
"required": true
Expand Down
2 changes: 1 addition & 1 deletion api-gateway/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ paths:
name: partNumber
required: true
type: string
- description: Voice Answer (only MP3)
- description: Voice Answer (only wav)
in: formData
name: voiceAnswer
required: true
Expand Down
6 changes: 3 additions & 3 deletions api-gateway/internal/handlers/ielts_exam_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func CreateOutlineAttemptWriting(ctx *gin.Context) {
// @Param examId path string true "Exam ID"
// @Param question query string true "Question"
// @Param partNumber query string true "Part Number"
// @Param voiceAnswer formData file true "Voice Answer (only MP3)"
// @Param voiceAnswer formData file true "Voice Answer (only wav)"
// @Success 200 {object} utils.AbsResponse
// @Failure 400 {object} utils.AbsResponse
// @Failure 409 {object} utils.AbsResponse
Expand All @@ -172,8 +172,8 @@ func CreateOutlineAttemptSpeaking(ctx *gin.Context) {
return
}
ext := strings.ToLower(filepath.Ext(file.Filename))
if ext != ".mp3" {
utils.RespondError(ctx, http.StatusBadRequest, "Only MP3 files are allowed")
if ext != ".wav" {
utils.RespondError(ctx, http.StatusBadRequest, "Only only wav files are allowed")
return
}
fileContent, err := file.Open()
Expand Down

0 comments on commit ded2206

Please sign in to comment.