소스 검색

fix: endpoint json unmarshaler

Yeuoly 10 달 전
부모
커밋
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