// // Copyright (C) Stanislaw Adaszewski, 2020 // Contact: s.adaszewski@gmail.com // Website: https://adared.ch/wba // License: GNU Affero General Public License, Version 3 // import makeArvadosRequest from 'make-arvados-request'; import arvadosTypeName from 'arvados-type-name'; function wbRenameObject(arvHost, arvToken, uuid, newName) { const update = { 'name': newName }; const typeName = arvadosTypeName(uuid); return makeArvadosRequest(arvHost, arvToken, '/arvados/v1/' + typeName + 's/' + uuid + '?' + typeName + '=' + encodeURIComponent(JSON.stringify(update)), { 'method': 'PUT' }); } export default wbRenameObject;