POST 重新命名指定文件夹

参数:

参数 说明
folderId 文件夹 ID
newName 新的文件夹名
newDescription 新的文件夹描述
newColor “red”,”orange”,”green”,”yellow”,”aqua”,”blue”,”purple”,”pink”

**

范例代码:

  1. var data = {
  2. "folderId": "KMUFMKTBHINM4",
  3. "newName": "New Name",
  4. "newDescription": "New Description",
  5. "newColor": "red"
  6. };
  7. var requestOptions = {
  8. method: 'POST',
  9. body: JSON.stringify(data),
  10. redirect: 'follow'
  11. };
  12. fetch("http://localhost:41595/api/folder/update", requestOptions)
  13. .then(response => response.json())
  14. .then(result => console.log(result))
  15. .catch(error => console.log('error', error));

返回结果:

  1. {
  2. "status": "success",
  3. "data": {
  4. "id": "KMUFMKTBHINM4",
  5. "name": "New Name",
  6. "description": "New Description",
  7. "images": [],
  8. "folders": [],
  9. "modificationTime": 1592409993367,
  10. "imagesMappings": {},
  11. "tags": [],
  12. "children": [],
  13. "isExpand": true,
  14. "size": 30,
  15. "vstype": "folder",
  16. "styles": {
  17. "depth": 0,
  18. "first": false,
  19. "last": false
  20. },
  21. "isVisible": true,
  22. "$$hashKey": "object:765",
  23. "editable": false,
  24. }
  25. }