Skip to content

Commit

Permalink
Force a new client version
Browse files Browse the repository at this point in the history
  • Loading branch information
OndrejSpanel committed Mar 16, 2020
1 parent 9580b70 commit 512bdc4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object RestAPIServer extends RestAPI with RestAPIUtils {
}
def uploadSession(userId: String, authCode: String, version: String) = syncResponse {
if (version != RestAPI.apiVersion) {
throw HttpErrorException(403, s"API version required: $version, client API version ${RestAPI.apiVersion} ")
throw HttpErrorException(403, s"Client version $version, required: ${RestAPI.apiVersion}")
} else {
createUploadSession(userId, authCode)
}
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}

lazy val commonSettings = Seq(
organization := "com.github.ondrejspanel",
version := "0.4.1-beta",
version := "0.4.2-beta",
scalaVersion := "2.12.10",
scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ object Start extends App {
(f, digest, fileBytes)
}

//println(s"uploadSession ${RestAPI.apiVersion}")
val createSession = api.uploadSession(userId, authCode, RestAPI.apiVersion)
Try {
Await.result(createSession, Duration.Inf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ trait RestAPI {
}

object RestAPI extends RestApiCompanion[EnhancedRestImplicits,RestAPI](EnhancedRestImplicits) {
final val apiVersion = "1.1"
final val apiVersion = "2.1-beta"
}

0 comments on commit 512bdc4

Please sign in to comment.