mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 00:45:43 +03:00
14 lines
312 B
JavaScript
14 lines
312 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import Helper from '@ember/component/helper';
|
|
|
|
export function formatID([model, relationship]) {
|
|
const id = model.belongsTo(relationship).id();
|
|
return { id, shortId: id.split('-')[0] };
|
|
}
|
|
|
|
export default Helper.helper(formatID);
|