Skip to content

Commit

Permalink
Put feature flags into a separate file.
Browse files Browse the repository at this point in the history
  • Loading branch information
bilus committed Sep 1, 2020
1 parent 985aaae commit b70aa9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 1 addition & 5 deletions actions/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func App() *buffalo.App {
app.Use(Authorize)

postsResource := PostsResource{}
app.GET("/", postsResource.List)
app.GET("/", BoardsResource{}.List)

app.POST("/posts", postsResource.Create)
app.GET("/posts/{post_id}/edit", postsResource.Edit)
Expand Down Expand Up @@ -125,10 +125,6 @@ func getEnv(name, def string) string {
return def
}

func isSignupEnabled() bool {
return getEnv("ENABLE_SIGNUPS", "true") == "true"
}

// translations will load locale files, set up the translator `actions.T`,
// and will return a middleware to use to load the correct locale for each
// request.
Expand Down
5 changes: 5 additions & 0 deletions actions/featureflags.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package actions

func isSignupEnabled() bool {
return getEnv("ENABLE_SIGNUPS", "true") == "true"
}

0 comments on commit b70aa9e

Please sign in to comment.