Only allow Application and Orderer types to update Channel Config
@@ -29,12 +29,18 @@ class ChannelIDSerializer(serializers.Serializer):
id = serializers.UUIDField(help_text="Channel ID")
+ORG_CHOICES = (
+ ("Application", "Application"),
+ ("Orderer", "Orderer"),
+)
+
+
class ChannelUpdateSerializer(serializers.Serializer):
msp_id = serializers.CharField(
max_length=128, help_text="MSP ID of Organization")
data = serializers.FileField(help_text="Channel config file")
org_type = serializers.CharField(
- max_length=24, help_text="Organization type")
+ max_length=24, help_text="Organization type", choices=ORG_CHOICES)
class ChannelOrgListSerializer(serializers.Serializer):
