mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-31 04:03:40 +00:00
make index package arches optional
This commit is contained in:
@@ -221,7 +221,7 @@ instance FromJSON IndexPkgReq where
|
|||||||
parseJSON = withObject "Index Package Request" $ \o -> do
|
parseJSON = withObject "Index Package Request" $ \o -> do
|
||||||
indexPkgReqId <- o .: "id"
|
indexPkgReqId <- o .: "id"
|
||||||
indexPkgReqVersion <- o .: "version"
|
indexPkgReqVersion <- o .: "version"
|
||||||
indexPkgReqArches <- o .: "arches"
|
indexPkgReqArches <- o .:? "arches"
|
||||||
pure IndexPkgReq{..}
|
pure IndexPkgReq{..}
|
||||||
instance ToJSON IndexPkgReq where
|
instance ToJSON IndexPkgReq where
|
||||||
toJSON IndexPkgReq{..} = object ["id" .= indexPkgReqId, "version" .= indexPkgReqVersion]
|
toJSON IndexPkgReq{..} = object ["id" .= indexPkgReqId, "version" .= indexPkgReqVersion]
|
||||||
|
|||||||
Reference in New Issue
Block a user