rename reorg
This commit is contained in:
parent
f4e8ab969e
commit
78983d1e33
1 changed files with 17 additions and 17 deletions
34
Lfs.hs
34
Lfs.hs
|
@ -175,6 +175,22 @@ instance ToJSON OperationParams where
|
||||||
|
|
||||||
instance FromJSON OperationParams
|
instance FromJSON OperationParams
|
||||||
|
|
||||||
|
data Verification = Verification
|
||||||
|
{ verification_oid :: SHA256
|
||||||
|
, verification_size :: Integer
|
||||||
|
}
|
||||||
|
deriving (Generic, Show)
|
||||||
|
|
||||||
|
instance ToJSON Verification where
|
||||||
|
toJSON = genericToJSON verifyBodyOptions
|
||||||
|
toEncoding = genericToEncoding verifyBodyOptions
|
||||||
|
|
||||||
|
instance FromJSON Verification where
|
||||||
|
parseJSON = genericParseJSON verifyBodyOptions
|
||||||
|
|
||||||
|
verifyBodyOptions :: Options
|
||||||
|
verifyBodyOptions = stripFieldPrefix defaultOptions
|
||||||
|
|
||||||
data GitRef = GitRef
|
data GitRef = GitRef
|
||||||
{ name :: T.Text }
|
{ name :: T.Text }
|
||||||
deriving (Generic, Show)
|
deriving (Generic, Show)
|
||||||
|
@ -252,25 +268,9 @@ uploadOperation op content oid size =
|
||||||
mkverifyreq' r = addLfsJsonHeaders $ r
|
mkverifyreq' r = addLfsJsonHeaders $ r
|
||||||
{ method = "POST"
|
{ method = "POST"
|
||||||
, requestBody = RequestBodyLBS $ encode $
|
, requestBody = RequestBodyLBS $ encode $
|
||||||
VerifyBody oid size
|
Verification oid size
|
||||||
}
|
}
|
||||||
|
|
||||||
data VerifyBody = VerifyBody
|
|
||||||
{ verifybody_oid :: SHA256
|
|
||||||
, verifybody_size :: Integer
|
|
||||||
}
|
|
||||||
deriving (Generic, Show)
|
|
||||||
|
|
||||||
instance ToJSON VerifyBody where
|
|
||||||
toJSON = genericToJSON verifyBodyOptions
|
|
||||||
toEncoding = genericToEncoding verifyBodyOptions
|
|
||||||
|
|
||||||
instance FromJSON VerifyBody where
|
|
||||||
parseJSON = genericParseJSON verifyBodyOptions
|
|
||||||
|
|
||||||
verifyBodyOptions :: Options
|
|
||||||
verifyBodyOptions = stripFieldPrefix defaultOptions
|
|
||||||
|
|
||||||
operationParamsRequest :: OperationParams -> Maybe Request
|
operationParamsRequest :: OperationParams -> Maybe Request
|
||||||
operationParamsRequest ps = do
|
operationParamsRequest ps = do
|
||||||
r <- parseRequest (T.unpack (href ps))
|
r <- parseRequest (T.unpack (href ps))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue