Преглед изворни кода

fix: endpoint json unmarshaler

Yeuoly пре 9 месеци
родитељ
комит
5b4e6a1732
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      internal/types/entities/plugin_entities/endpoint_declaration.go

+ 4 - 0
internal/types/entities/plugin_entities/endpoint_declaration.go

@@ -93,6 +93,10 @@ func (e *EndpointProviderDeclaration) UnmarshalJSON(data []byte) error {
 
 	*e = EndpointProviderDeclaration(temp.alias)
 
+	if len(temp.Endpoints) == 0 {
+		return nil
+	}
+
 	var raw_endpoints []json.RawMessage
 	if err := json.Unmarshal(temp.Endpoints, &raw_endpoints); err != nil {
 		return err