mirror of
https://github.com/rancher/types.git
synced 2025-07-19 07:46:25 +00:00
Mapper fixes
This commit is contained in:
parent
37d46e733c
commit
c9565e2f53
@ -24,7 +24,8 @@ func (c *Creator) ToInternal(data map[string]interface{}) {
|
||||
func (c *Creator) ModifySchema(schema *types.Schema, schemas *types.Schemas) error {
|
||||
if schema.CanList() && schema.CanCreate() {
|
||||
schema.ResourceFields["creatorId"] = types.Field{
|
||||
Type: "reference[user]",
|
||||
Type: "reference[user]",
|
||||
CodeName: "CreatorID",
|
||||
}
|
||||
c.m = &mapper.AnnotationField{Field: "creatorId"}
|
||||
return c.m.ModifySchema(schema, schemas)
|
||||
|
@ -14,7 +14,7 @@ func (n NodeAddressMapper) FromInternal(data map[string]interface{}) {
|
||||
t := address["type"]
|
||||
a := address["address"]
|
||||
if t == "InternalIP" {
|
||||
data["IpAddress"] = a
|
||||
data["ipAddress"] = a
|
||||
} else if t == "Hostname" {
|
||||
data["hostname"] = a
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user