fixes issue with urn property being encoded inPOST request payload to save retention

This commit is contained in:
Seyi Adebajo 2018-05-22 15:25:11 -07:00
parent 46f52e14ee
commit dd374df0a4

View File

@ -1,4 +1,5 @@
import { IDatasetRetention } from 'wherehows-web/typings/api/datasets/retention'; import { IDatasetRetention } from 'wherehows-web/typings/api/datasets/retention';
import { decodeUrn } from 'wherehows-web/utils/validators/urn';
/** /**
* 'News' a IDatasetRetention instance with the provided dataset urn * 'News' a IDatasetRetention instance with the provided dataset urn
@ -6,7 +7,7 @@ import { IDatasetRetention } from 'wherehows-web/typings/api/datasets/retention'
* @returns {IDatasetRetention} * @returns {IDatasetRetention}
*/ */
const retentionObjectFactory = (urn: string): IDatasetRetention => ({ const retentionObjectFactory = (urn: string): IDatasetRetention => ({
datasetUrn: urn, datasetUrn: decodeUrn(urn),
purgeNote: '', purgeNote: '',
purgeType: '' purgeType: ''
}); });