This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'CO-335' into Squad1/CO-334/implement-v0-endpoints
- Loading branch information
Showing
6 changed files
with
47 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module Cardano.Wallet.API.V1.Internal.Update where | ||
|
||
import Servant | ||
|
||
import Cardano.Wallet.API.Response (ValidJSON) | ||
|
||
type API = | ||
"update" | ||
:> ( "apply" | ||
:> Post '[ValidJSON] NoContent | ||
:<|> "postpone" | ||
:> Post '[ValidJSON] NoContent | ||
) |
17 changes: 17 additions & 0 deletions
17
wallet-new/src/Cardano/Wallet/API/V1/LegacyHandlers/Internal/Update.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module Cardano.Wallet.API.V1.LegacyHandlers.Internal.Update where | ||
|
||
import Servant | ||
|
||
import qualified Pos.Wallet.Web.Methods.Misc as V0 | ||
|
||
import qualified Cardano.Wallet.API.V1.Internal.Update as Update | ||
import Cardano.Wallet.API.V1.Migration (MonadV1) | ||
|
||
handlers :: ServerT Update.API MonadV1 | ||
handlers = applyUpdate :<|> postponeUpdate | ||
|
||
applyUpdate :: MonadV1 NoContent | ||
applyUpdate = V0.applyUpdate | ||
|
||
postponeUpdate :: MonadV1 NoContent | ||
postponeUpdate = V0.postponeUpdate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
help: ## Print documentation | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
ghcid: ## Run ghcid with the wallet-new project | ||
ghcid \ | ||
--command "stack ghci cardano-sl-wallet --ghci-options=-fno-code" | ||
|
||
ghcid-test: ## Have ghcid run the test suite for the wallet-new-specs on successful recompile | ||
ghcid \ | ||
--command "stack ghci cardano-sl-wallet:lib cardano-sl-wallet:test:cardano-wallet-test --ghci-options=-fobject-code" \ | ||
--test "main" | ||
|
||
.PHONY: ghcid ghcid-test help |