Update allocations to support ids; protect endpoints; support notes
This commit is contained in:
parent
9c3b9a0fae
commit
2278927fb6
19 changed files with 217 additions and 62 deletions
|
@ -39,6 +39,7 @@ class AllocationTransformer extends BaseTransformer
|
|||
'ip' => $allocation->ip,
|
||||
'alias' => $allocation->ip_alias,
|
||||
'port' => $allocation->port,
|
||||
'notes' => $allocation->notes,
|
||||
'assigned' => ! is_null($allocation->server_id),
|
||||
];
|
||||
}
|
||||
|
|
|
@ -25,9 +25,11 @@ class AllocationTransformer extends BaseClientTransformer
|
|||
public function transform(Allocation $model)
|
||||
{
|
||||
return [
|
||||
'id' => $model->id,
|
||||
'ip' => $model->ip,
|
||||
'ip_alias' => $model->ip_alias,
|
||||
'port' => $model->port,
|
||||
'notes' => $model->notes,
|
||||
'is_default' => $model->server->allocation_id === $model->id,
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue