open-vault/ui/app/helpers/jsonify.js
Angel Garbarino 89de6267c7
Allow AWS secret engine to send empty policy document (#23470) (#23509)
* fix

* changelog

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
2023-10-08 13:10:35 -06:00

15 lines
369 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { helper as buildHelper } from '@ember/component/helper';
export function jsonify([target]) {
// aws secret engine needs to be able to send an empty json value on the field policy_document
if (!target) return;
return JSON.parse(target);
}
export default buildHelper(jsonify);