Просмотр исходного кода

fix: endpoint json unmarshaler

Yeuoly месяцев назад: 9
Родитель
Сommit
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