DEV: Add 201 to bootstrap-json accepted status codes (#15102)

DEV: Add 201 to bootstrap-json accepted status codes (#15102)

The theme creator endpoints return JSON with a 201 CREATED status code. With the recent changes to bootstrap-json/index.js for the Ember CLI proxy, these endpoints were broken because 201 was not an accepted status code. This commit simply adds 201 to the array, but prettier forced a reformat as well!

diff --git a/app/assets/javascripts/discourse/lib/bootstrap-json/index.js b/app/assets/javascripts/discourse/lib/bootstrap-json/index.js
index 4295eeb..1685d53 100644
--- a/app/assets/javascripts/discourse/lib/bootstrap-json/index.js
+++ b/app/assets/javascripts/discourse/lib/bootstrap-json/index.js
@@ -230,7 +230,18 @@ async function handleRequest(proxy, baseURL, req, res) {
     req.headers["X-Discourse-Asset-Path"] = req.path;
   }
 
-  const acceptedStatusCodes = [200, 301, 302, 303, 307, 308, 404, 403, 500];
+  const acceptedStatusCodes = [
+    200,
+    201,
+    301,
+    302,
+    303,
+    307,
+    308,
+    404,
+    403,
+    500,
+  ];
   const proxyRequest = bent(req.method, acceptedStatusCodes);
   const requestBody = req.method === "GET" ? null : req.body;
   const response = await proxyRequest(url, requestBody, req.headers);

GitHub sha: 73db60ad2ad623ecf79f4296f97fb68f6439447b

This commit appears in #15102 which was approved by CvX. It was merged by martin.