Skip to content

Commit

Permalink
Merge branch 'master' into jane/api-sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
kevee authored Apr 30, 2020
2 parents 11bf472 + d0042d2 commit 608408f
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 77 deletions.
32 changes: 0 additions & 32 deletions functions/api-proxy.js

This file was deleted.

24 changes: 0 additions & 24 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,6 @@ exports.createPages = async ({ graphql, actions }) => {
component: path.resolve(`./src/templates/state.js`),
context: node,
})

createRedirect({
fromPath: `/api/states state=${node.state}`,
toPath: `/api/v1/states/${node.state.toLowerCase()}/current.json`,
isPermanent: true,
})

createRedirect({
fromPath: `/api/states/daily.csv state=${node.state}`,
toPath: `/api/v1/states/${node.state.toLowerCase()}/current.csv`,
isPermanent: true,
})
})

result.data.allContentfulBlogPost.edges.forEach(({ node }) => {
Expand All @@ -88,18 +76,6 @@ exports.createPages = async ({ graphql, actions }) => {
context: node,
})
})

createRedirect({
fromPath: `/api/states* `,
toPath: `/.netlify/functions/api-proxy/states:splat`,
isPermanent: true,
})

createRedirect({
fromPath: `/api/us* `,
toPath: `/.netlify/functions/api-proxy/us:splat`,
isPermanent: true,
})
}

exports.onCreateWebpackConfig = ({ stage, actions, loaders, getConfig }) => {
Expand Down
1 change: 0 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[build]
publish = "public"
command = "npm run build"
functions = "functions"

[context.production]
command = "npm run build"
Expand Down
21 changes: 1 addition & 20 deletions static/_redirects
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
/api/v1/us.json /api/v1/us/current.json
/api/v1/states.json /api/v1/states/current.json
/api/states.csv /api/v1/states/current.csv
/api/states/current.json /api/v1/states/current.json
/api/urls /api/v1/urls.json
/api/urls.csv /api/v1/urls.csv
/api/urls.html /api/v1/urls.html
/api/screenshots /api/v1/screenshots.json
/api/screenshots.csv /api/v1/screenshots.csv
/api/screenshots.html /api/v1/screenshots.html
/api/press /api/v1/press.json
/api/press.csv /api/v1/press.csv
/api/press.html /api/v1/press.html
/api/counties /api/v1/counties.json
/api/counties.csv /api/v1/counties.csv
/api/counties.html /api/v1/counties.html
/api/us.csv /api/v1/us/current.csv
/api/us/daily /api/v1/us/daily.json
/api/us/daily.csv /api/v1/us/daily.csv
/api/v1/states /api/v1/states/current.json

/api/graphql /404
/api/* https://covid.cape.io/:splat 200

/charts/dash http://35.212.27.3:8050/
/graphql /api/graphql
Expand Down

0 comments on commit 608408f

Please sign in to comment.