Skip to content

Commit

Permalink
Fix MediumsAPI dose not work
Browse files Browse the repository at this point in the history
  • Loading branch information
TAKESHI SHIMADA committed Nov 18, 2018
1 parent 84a1545 commit e9fc4e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/swagger.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.github.cactacea.backend.controllers

import java.io.File

import com.google.inject.{Inject, Singleton}
import com.twitter.finagle.http.{Request, Status}
import com.twitter.finatra.http.request.RequestUtils
Expand Down Expand Up @@ -30,9 +32,12 @@ class MediumsController @Inject()(@Flag("cactacea.api.prefix") apiPrefix: String
}

postWithPermission("/mediums")(Permissions.media) { o =>

o.summary("Upload a medium")
.tag(mediumsTag)
.operationId("uploadMedium")
.consumes("multipart/form-data")
.formParam[File](name = "file", description = "Upload a medium file", true)
.responseWith[MediumCreated](Status.Created.code, successfulMessage)
.responseWith(Status.BadRequest.code, NotAcceptableMimeTypeFound.message)

Expand Down

0 comments on commit e9fc4e2

Please sign in to comment.