blob: 9ee7427f5f6f9acef7c90b1e1f49a7c04bf01b15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import { Serializer } from 'globunet-angular/core/providers/api/serializer';
import {Client} from '../model/client';
export class ClientSerializer extends Serializer {
toJson(client: Client): any {
// @ts-ignore
client.repository = (typeof client.repository === 'object') ? client.repository.id : client.repository;
// @ts-ignore
client.hardwareProfile = (client.hardwareProfile) ? client.hardwareProfile.id : null;
// @ts-ignore
client.netboot = (typeof client.netboot === 'object') ? client.netboot.id : client.netboot;
return super.toJson(client);
}
}
|