IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
495B

  1. import makeArvadosRequest from 'make-arvados-request';
  2. import arvadosTypeName from 'arvados-type-name';
  3. function wbRenameObject(arvHost, arvToken, uuid, newName) {
  4. const update = {
  5. 'name': newName
  6. };
  7. const typeName = arvadosTypeName(uuid);
  8. return makeArvadosRequest(arvHost, arvToken,
  9. '/arvados/v1/' + typeName + 's/' +
  10. uuid + '?' + typeName + '=' +
  11. encodeURIComponent(JSON.stringify(update)),
  12. { 'method': 'PUT' });
  13. }
  14. export default wbRenameObject;