wip
This commit is contained in:
@@ -18,10 +18,10 @@ func RenderFile(rawJSON []byte) ([]byte, error) {
|
||||
return nil, fmt.Errorf("failed to parse JSON: %w", err)
|
||||
}
|
||||
|
||||
// 2) extract type from "@type" Property
|
||||
contentType, ok := data["@type"].(string)
|
||||
// 2) extract type from "_type" Property
|
||||
contentType, ok := data["_type"].(string)
|
||||
if !ok || contentType == "" {
|
||||
return nil, fmt.Errorf("JSON does not contain a valid '@type' property")
|
||||
return nil, fmt.Errorf("JSON does not contain a valid '_type' property")
|
||||
}
|
||||
|
||||
// 3) get the template from the registry
|
||||
|
Reference in New Issue
Block a user