瀏覽代碼

Update packages/services/src/setting/index.ts

Co-Authored-By: Jason Grout <jasongrout@users.noreply.github.com>
Ray Zhang 5 年之前
父節點
當前提交
066ea88137
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      packages/services/src/setting/index.ts

+ 1 - 2
packages/services/src/setting/index.ts

@@ -106,8 +106,7 @@ export class SettingManager extends DataConnector<
     const { makeRequest, ResponseError } = ServerConnection;
     const base = baseUrl + appUrl;
     const url = Private.url(base, id);
-    // NOTE: The body is JSON5, so it must be converted to valid JSON beforehand by wrapping it as a string
-    // in the form {'raw': '...'} where '...' is the JSON5 payload string.
+    // NOTE: 'raw' is JSON5 (not valid JSON), so we encode it as a string in a valid JSON body
     const init = { body: JSON.stringify({ raw }), method: 'PUT' };
     const response = await makeRequest(url, init, serverSettings);