From 7516581f0df66994c182d042e4fabd24dfe40694 Mon Sep 17 00:00:00 2001 From: Ewout Van Schil Date: Sun, 15 Jul 2018 16:30:45 +0200 Subject: [PATCH] Fix API Deploys --- app/controllers/ApiController.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/ApiController.scala b/app/controllers/ApiController.scala index f872a673c..16977d2fa 100644 --- a/app/controllers/ApiController.scala +++ b/app/controllers/ApiController.scala @@ -174,7 +174,7 @@ final class ApiController @Inject()(api: OreRestfulApi, val apiKeyExists: Future[Boolean] = this.service.DB.db.run(compiled(Deployment, formData.apiKey, projectData.project.id.get).result) EitherT.liftF(apiKeyExists) - .filterOrElse(apiKey => !apiKey, Unauthorized(error("apiKey", "api.deploy.invalidKey"))) + .filterOrElse(apiKey => apiKey, Unauthorized(error("apiKey", "api.deploy.invalidKey"))) .semiFlatMap(_ => projectData.project.versions.exists(_.versionString === name)) .filterOrElse(nameExists => !nameExists, BadRequest(error("versionName", "api.deploy.versionExists"))) .semiFlatMap(_ => projectData.project.owner.user)