mirror of
https://github.com/Start9Labs/registry.git
synced 2026-04-01 20:44:15 +00:00
limit strict bs converstion and refactor to not use fs read
This commit is contained in:
committed by
Keagan McClelland
parent
aadbc385d0
commit
c7effc51f4
@@ -14,6 +14,7 @@ import Lib.Types.Emver
|
||||
import Data.Semigroup
|
||||
import Lib.External.AppMgr
|
||||
import Lib.Error
|
||||
import qualified Data.ByteString.Lazy as BS
|
||||
|
||||
getVersionFromQuery :: KnownSymbol a => FilePath -> Extension a -> Handler (Maybe Version)
|
||||
getVersionFromQuery rootDir ext = do
|
||||
@@ -38,4 +39,4 @@ getBestVersion rootDir ext spec = do
|
||||
addPackageHeader :: (MonadHandler m, KnownSymbol a) => FilePath -> FilePath -> Extension a -> m ()
|
||||
addPackageHeader appMgrDir appDir appExt = do
|
||||
packageHash <- handleS9ErrT $ getPackageHash appMgrDir appDir appExt
|
||||
addHeader "X-S9PK-HASH" $ decodeUtf8 packageHash
|
||||
addHeader "X-S9PK-HASH" $ decodeUtf8 $ BS.toStrict packageHash
|
||||
|
||||
Reference in New Issue
Block a user