From 93ca4401488c6a73e4439abfcad6275e762f60f2 Mon Sep 17 00:00:00 2001
From: Dean Sheather <dean@deansheather.com>
Date: Thu, 20 Jun 2019 05:37:22 +1000
Subject: [PATCH] add status code to /upload/simple

---
 lib/routes/uploadpomf.go | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/routes/uploadpomf.go b/lib/routes/uploadpomf.go
index 23f9e33..1831f4d 100644
--- a/lib/routes/uploadpomf.go
+++ b/lib/routes/uploadpomf.go
@@ -356,9 +356,12 @@ func UploadPomf(associateObjectsWithUser bool, simpleResponse bool) func(http.Re
 		// Simple response
 		if simpleResponse {
 			for _, fResponse := range fileResponses {
-				w.Write([]byte(fmt.Sprintf("%s\n", fResponse.URL)))
+				if fResponse.Success {
+					w.Write([]byte(fmt.Sprintf("%s,200\n", fResponse.URL)))
+				} else {
+					w.Write([]byte(",500\n"))
+				}
 			}
-
 		} else {
 			render.JSON(w, r, fullResponse{Success: true, Files: fileResponses})
 		}
-- 
GitLab