Skip to content

Commit

Permalink
Fix whoami route typo (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
expede authored Sep 15, 2021
1 parent 536c05c commit ea227ec
Show file tree
Hide file tree
Showing 14 changed files with 123 additions and 146 deletions.
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@ env.yaml
domain-key.txt
domain-crt.txt

### Node ###
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
yarn.lock
package.json
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
pids
*.pid
*.seed
*.pid.lock
web_modules/
node_modules/
jspm_packages/
.npm
.node_repl_history

### Haskell ###
dist
dist-*
Expand Down
18 changes: 9 additions & 9 deletions fission-web-api/library/Fission/Web/API/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ data RoutesV2 mode = RoutesV2
deriving Generic

data V2 mode = V2
{ ipfs :: mode :- "ipfs" :> ToServantApi IPFS.RoutesV2
, app :: mode :- "app" :> ToServantApi App.RoutesV2
, user :: mode :- "user" :> ToServantApi User.RoutesV2
, auth :: mode :- "auth" :> "ucan" :> ToServantApi UCAN.Routes
{ ipfs :: mode :- "ipfs" :> ToServantApi IPFS.RoutesV2
, app :: mode :- "app" :> ToServantApi App.RoutesV2
, user :: mode :- "user" :> ToServantApi User.RoutesV2
, auth :: mode :- "auth" :> "ucan" :> ToServantApi UCAN.Routes
}
deriving Generic

-- DEPRECATED version
data RoutesV_ mode = RoutesV_
{ ipfs :: mode :- "ipfs" :> ToServantApi IPFS.RoutesV_
, app :: mode :- "app" :> ToServantApi App.RoutesV_
, user :: mode :- "user" :> ToServantApi User.RoutesV_
, dns :: mode :- "dns" :> ToServantApi DNS.Routes
, auth :: mode :- "auth" :> "ucan" :> ToServantApi UCAN.Routes
{ ipfs :: mode :- "ipfs" :> ToServantApi IPFS.RoutesV_
, app :: mode :- "app" :> ToServantApi App.RoutesV_
, user :: mode :- "user" :> ToServantApi User.RoutesV_
, dns :: mode :- "dns" :> ToServantApi DNS.Routes
, auth :: mode :- "auth" :> "ucan" :> ToServantApi UCAN.Routes

, ping ::
mode
Expand Down
18 changes: 9 additions & 9 deletions fission-web-api/library/Fission/Web/API/User/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ import Fission.Web.API.User.Verify.Types
import qualified Fission.Web.API.User.WhoAmI.Types as WhoAmI

data RoutesV2 mode = RoutesV2
{ create :: mode :- Create.WithDID
, dataRoot :: mode :- "data" :> ToServantApi DataRoot.RoutesV2
, email :: mode :- "email" :> ToServantApi Email.Routes
, did :: mode :- "did" :> ToServantApi DID.Routes
, whoAmI :: mode :- "whoami" :> ToServantApi WhoAmI.Routes
, linkingRelay :: mode :- "user" :> "link" :> ToServantApi Relay.Routes
{ dataRoot :: mode :- "data" :> ToServantApi DataRoot.RoutesV2
, email :: mode :- "email" :> ToServantApi Email.Routes
, did :: mode :- "did" :> ToServantApi DID.Routes
, whoAmI :: mode :- "whoami" :> ToServantApi WhoAmI.Routes
, linkingRelay :: mode :- "link" :> ToServantApi Relay.Routes
, create :: mode :- Create.WithDID
}
deriving Generic

data RoutesV_ mode = RoutesV_
{ create :: mode :- ToServantApi Create.RoutesV_
, whoAmI :: mode :- ToServantApi WhoAmI.Routes
{ whoAmI :: mode :- "whoami" :> ToServantApi WhoAmI.Routes
, email :: mode :- "email" :> ToServantApi Email.Routes
, did :: mode :- "did" :> ToServantApi DID.Routes
, exchangeKeys :: mode :- "exchange" :> "keys" :> ToServantApi ExchangeKeys.Routes
, linkingRelay :: mode :- "user" :> "link" :> ToServantApi Relay.Routes
, linkingRelay :: mode :- "link" :> ToServantApi Relay.Routes
, dataRoot :: mode :- "data" :> ToServantApi DataRoot.RoutesV_
, passwordReset :: mode :- Password.Reset
, verify :: mode :- Verify
, create :: mode :- ToServantApi Create.RoutesV_
}
deriving Generic
2 changes: 1 addition & 1 deletion fission-web-api/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: fission-web-api
version: '2.0.0.0'
version: '2.0.1.0'
category: API
author:
- Brooklyn Zelenka
Expand Down
2 changes: 1 addition & 1 deletion fission-web-server/library/Fission/Web/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,4 @@ server appHost =
}

v2Docs =
Web.Swagger.handler fromHandler appHost Fission.version (Proxy @(ToServantApi Fission.RoutesV2))
Web.Swagger.handler fromHandler appHost Fission.version (Proxy @("v2" :> (ToServantApi Fission.RoutesV2)))
2 changes: 1 addition & 1 deletion fission-web-server/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: fission-web-server
version: '2.16.0.0'
version: '2.16.1.0'
category: API
author:
- Brooklyn Zelenka
Expand Down
79 changes: 0 additions & 79 deletions rosetta.nix

This file was deleted.

81 changes: 41 additions & 40 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
let
sources = import ./nix/sources.nix;
commands = import ./nix/commands.nix;
{ rosetta ? false }:
let
sources = import ./nix/sources.nix;
commands = import ./nix/commands.nix;

nixos = import sources.nixos {};
darwin = import sources.darwin {};
unstable = import sources.unstable {};
overrides = if rosetta then { system = "x86_64-darwin"; } else {};

pkgs = if darwin.stdenv.isDarwin then darwin else nixos;
tasks = commands {
inherit pkgs;
inherit unstable;
inherit server-path;
inherit server-port;
};
nixos = import sources.nixos overrides;
darwin = import sources.darwin overrides;
unstable = import sources.unstable overrides;

server-path = "~/.local/bin/fission-server";
server-port = 10235;
pkgs = if darwin.stdenv.isDarwin then darwin else nixos;
tasks = commands {
inherit pkgs;
inherit unstable;
inherit server-path;
inherit server-port;
};

deps = {
bench = [pkgs.wrk2];
server-path = "~/.local/bin/fission-server";
server-port = 10235;

common = [
pkgs.gnumake
unstable.niv
];
deps = {
common = [
pkgs.gnumake
unstable.niv
];

crypto = [
crypto = [
pkgs.openssl.dev
pkgs.openssl.out
];
Expand All @@ -34,7 +35,7 @@ let

data = [
pkgs.ipfs
pkgs.lzma.dev
pkgs.lzma.dev
pkgs.lzma.out
pkgs.zlib.dev
pkgs.zlib.out
Expand All @@ -55,24 +56,24 @@ let
unstable.darwin.apple_sdk.frameworks.Foundation
unstable.darwin.apple_sdk.frameworks.Cocoa
]
else
else
[];
};
in

unstable.haskell.lib.buildStackProject {
name = "Fission";
nativeBuildInputs = builtins.concatLists [
deps.common
deps.crypto
deps.cli
deps.data
deps.macos
deps.haskell
tasks
];
in
unstable.haskell.lib.buildStackProject {
name = "Fission";
nativeBuildInputs = builtins.concatLists [
deps.common
deps.crypto
deps.cli
deps.data
deps.macos
deps.haskell
tasks
];

shellHook = ''
export LANG=C.UTF8
'';
}
shellHook = ''
export LANG=C.UTF8
'';
}
4 changes: 2 additions & 2 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-18.9
resolver: lts-18.10
allow-newer: true

packages:
Expand Down Expand Up @@ -35,4 +35,4 @@ ghc-options:
nix:
enable: true
pure: true
shell-file: rosetta.nix
shell-file: shell.nix
8 changes: 4 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ packages:
hackage: http-link-header-1.0.3.1
snapshots:
- completed:
size: 586923
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/9.yaml
sha256: 9f9fe35c949414146840a985fb228fd397c504d1781b834bfc9ab935f4d27df6
original: lts-18.9
size: 587546
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/10.yaml
sha256: 88b4f81e162ba3adc230a9fcccc4d19ac116377656bab56c7382ca88598b257a
original: lts-18.10
1 change: 1 addition & 0 deletions swagger_snapshots/fission-web-api-1.3.0.0/v_.json

Large diffs are not rendered by default.

Loading

0 comments on commit ea227ec

Please sign in to comment.