Skip to content

Commit

Permalink
Fix /download and /transfer routes
Browse files Browse the repository at this point in the history
  • Loading branch information
jvmusin committed Feb 28, 2024
1 parent 2e4abd2 commit 44ee2d9
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.jvmusin.polybacs.server

import io.github.jvmusin.polybacs.util.ToastSender
import io.github.jvmusin.polybacs.WebSocketConnectionKeeper
import io.github.jvmusin.polybacs.api.AdditionalProblemProperties
import io.github.jvmusin.polybacs.api.ProblemInfo
Expand All @@ -12,6 +11,7 @@ import io.github.jvmusin.polybacs.polygon.PolygonService
import io.github.jvmusin.polybacs.polygon.api.toDto
import io.github.jvmusin.polybacs.polygon.exception.downloading.ProblemDownloadingException
import io.github.jvmusin.polybacs.sybon.toZipArchive
import io.github.jvmusin.polybacs.util.ToastSender
import jakarta.servlet.http.HttpServletResponse
import jakarta.servlet.http.HttpSession
import org.springframework.http.HttpStatus
Expand All @@ -33,8 +33,7 @@ class ProblemController(
return problemInfo.toDto(problem)
}

@PostMapping
@RequestMapping("/download")
@PostMapping("/download")
suspend fun download(
@PathVariable problemId: Int,
fullName: String,
Expand All @@ -53,8 +52,7 @@ class ProblemController(
response.outputStream.use { zip.toFile().inputStream().copyTo(it) }
}

@PostMapping
@RequestMapping("/transfer")
@PostMapping("/transfer")
suspend fun transfer(
@PathVariable problemId: Int,
fullName: String,
Expand Down

0 comments on commit 44ee2d9

Please sign in to comment.