Files
nomad/ui/app/serializers/service.js
2023-08-10 17:27:29 -05:00

17 lines
439 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import classic from 'ember-classic-decorator';
import ApplicationSerializer from './application';
@classic
export default class ServiceSerializer extends ApplicationSerializer {
normalize(typeHash, hash) {
hash.AllocationID = hash.AllocID;
hash.JobID = JSON.stringify([hash.JobID, hash.Namespace]);
return super.normalize(typeHash, hash);
}
}