Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#package-ecosystem-
directory: "/" # Location of package manifests
target-branch: "dev"
schedule:
interval: "weekly"
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## What

_what the PR changes_

## Why

_why these changes were made_

## Test Plan

_how did you verify these changes did what you expected_

## Env Vars

_did you add, remove, or rename any environment variables_

## Checklist

- [ ] Tested all changes locally
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ go vet *.go
- [x] Move Hide Vote to create instead of after you vote :skull:
- [ ] Display the reason why a user is on the results page of a running poll
- [ ] Display minimum time left that a poll is open
- [ ] Move routes to their own functions
- [ ] Change HTTP resposne codes to be `http.something` instead of just a number
11 changes: 9 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ func main() {
)
oidcClient.setupOidcClient(os.Getenv("VOTE_OIDC_ID"), os.Getenv("VOTE_OIDC_SECRET"))
InitConstitution()

if (DEV_DISABLE_ACTIVE_FILTERS) {
logging.Logger.WithFields(logrus.Fields{"method": "main init"}).Warning("Dev disable active filters is set!")
}

if (DEV_FORCE_IS_EVALS) {
logging.Logger.WithFields(logrus.Fields{"method": "main init"}).Warning("Dev force evals is set!")
}

r.GET("/auth/login", csh.AuthRequest)
r.GET("/auth/callback", csh.AuthCallback)
r.GET("/auth/logout", csh.AuthLogout)
Expand Down Expand Up @@ -300,8 +309,6 @@ func main() {
UserId: claims.UserInfo.Username,
}

fmt.Println(poll.Options)

for _, option := range poll.Options {
optionRankStr := c.PostForm(option)
optionRank, err := strconv.Atoi(optionRankStr)
Expand Down