Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
Frontend sign up page
Browse files Browse the repository at this point in the history
  • Loading branch information
AndiLavera committed Mar 27, 2020
1 parent 6c3785f commit 95544f2
Show file tree
Hide file tree
Showing 22 changed files with 13,463 additions and 1,960 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-transform-runtime"
]
}
23 changes: 0 additions & 23 deletions .icr_1NG-JtL5MKwYwNWnCghRTg.cr

This file was deleted.

36 changes: 26 additions & 10 deletions config/routes.cr
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ Amber::Server.configure do
plug Authenticate.new
end

pipeline :api_jwt do
plug AuthenticateJWT.new
end

pipeline :api_with_key do
# plug AuthenticateAPIKey.new
end

pipeline :api do
# plug Amber::Pipe::PoweredByAmber.new
plug Amber::Pipe::Error.new
Expand All @@ -35,30 +43,38 @@ Amber::Server.configure do

routes :web do
get "/", ApplicationController, :root
get "/dashboard", ApplicationController, :dashboard
get "/dashboard/*", ApplicationController, :dashboard
get "/signup", ApplicationController, :sign_up

get "/signin", SessionController, :new
post "/session", SessionController, :create
get "/signup", UserController, :new

post "/registration", UserController, :create
end

routes :auth do
get "/profile", UserController, :show
get "/profile/edit", UserController, :edit
patch "/profile", UserController, :update
get "/signout", SessionController, :delete
# Routes for main website
#
# Users can sign up, set up dashboard or view documentation
# with these routes
routes :api_with_jwt do
# get "/profile", UserController, :show
# get "/profile/edit", UserController, :edit
# patch "/profile", UserController, :update
# get "/signout", SessionController, :delete
end

routes :api, "/api/v1" do
# Routes for api
#
# These are all the endpoints of the service
routes :api_with_key, "/api/v1" do
get "/account", AccountController, :index
post "/account", AccountController, :create

post "/signup", UsersController, :create
end

# Serves static files
routes :static do
# Each route is defined as follow
# verb resource : String, controller : Symbol, action : Symbol
get "/*", Amber::Controller::Static, :index
end
end
8 changes: 0 additions & 8 deletions frontend-react/src/components/HelloAmber/index.css

This file was deleted.

12 changes: 0 additions & 12 deletions frontend-react/src/components/HelloAmber/index.js

This file was deleted.

11 changes: 0 additions & 11 deletions frontend-react/src/components/HelloReact/index.css

This file was deleted.

12 changes: 0 additions & 12 deletions frontend-react/src/components/HelloReact/index.js

This file was deleted.

5 changes: 5 additions & 0 deletions frontend-react/src/components/Router/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Switch, Route } from 'react-router-dom';
import Home from '../pages/Home';
import About from '../pages/About';
import Contact from '../pages/Contact';
import SignUp from '../pages/SignUp';

const Routes = (props) => {
const { classes } = props
Expand All @@ -22,6 +23,10 @@ const Routes = (props) => {
exact path='/about'
render={(props) => <About {...props} classes={classes} />}
/>
<Route
exact path='/signup'
render={(props) => <SignUp {...props} />}
/>
</Switch>
)
}
Expand Down
Empty file.
Loading

0 comments on commit 95544f2

Please sign in to comment.