blob: 694e15f919c1d61792f1921b92f96d11c1939ee0 (
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 = (client.repository) ? client.repository.id : null;
// @ts-ignore
client.hardwareProfile = (client.hardwareProfile) ? client.hardwareProfile.id : null;
// @ts-ignore
client.netboot = (client.netboot) ? client.netboot.id : null;
return super.toJson(client);
}
}
|