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
|
||||
|
||||
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
|
||||
{ name :: T.Text }
|
||||
deriving (Generic, Show)
|
||||
|
@ -252,25 +268,9 @@ uploadOperation op content oid size =
|
|||
mkverifyreq' r = addLfsJsonHeaders $ r
|
||||
{ method = "POST"
|
||||
, 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 ps = do
|
||||
r <- parseRequest (T.unpack (href ps))
|
||||
|
|
Loading…
Reference in a new issue