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.

24 lines
681B

  1. //
  2. // Copyright (C) Stanislaw Adaszewski, 2020
  3. // Contact: s.adaszewski@gmail.com
  4. // Website: https://adared.ch/wba
  5. // License: GNU Affero General Public License, Version 3
  6. //
  7. import makeArvadosRequest from 'make-arvados-request';
  8. import arvadosTypeName from 'arvados-type-name';
  9. function wbUpdateField(arvHost, arvToken, uuid, fieldName, fieldValue) {
  10. const typeName = arvadosTypeName(uuid);
  11. const data = {};
  12. data[fieldName] = fieldValue;
  13. const prom = makeArvadosRequest(arvHost, arvToken,
  14. '/arvados/v1/' + typeName + 's/' + uuid, {
  15. method: 'PUT',
  16. data: JSON.stringify(data)
  17. });
  18. return prom;
  19. }
  20. export default wbUpdateField;