From 19eda612343dcc7232adc603ec2530019d853c76 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Sun, 20 Sep 2020 12:44:38 +0200 Subject: [PATCH] Fix parameter error --- Sources/App/routes.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/App/routes.swift b/Sources/App/routes.swift index 7227dc9..132bf93 100755 --- a/Sources/App/routes.swift +++ b/Sources/App/routes.swift @@ -107,7 +107,7 @@ func routes(_ app: Application) throws { } // Upload an image - app.postCatching("images", "n") { request -> Data in + app.postCatching("images", ":n") { request -> Data in guard let cap = request.parameters.get("n", as: Int.self) else { log("Invalid parameter for cap") throw Abort(.badRequest)