Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #10 from nnev/nononthursdays
Browse files Browse the repository at this point in the history
don't allow scheduling for non-thursdays
  • Loading branch information
Merovius committed Oct 28, 2015
2 parents cf35eee + 34a4e2e commit 1b1bfe0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ func handlePost(res http.ResponseWriter, req *http.Request) {

date, _ := time.ParseInLocation("2006-01-02", dateStr, loc)

if !date.IsZero() && date.Weekday() != time.Thursday {
writeError(400, res, "The date is not a thursday, we currently (and for the forseeable future) don't have talks on non-thursdays.")
return
}

id, err := strconv.Atoi(idStr)
if err != nil {
id = -1
Expand Down

0 comments on commit 1b1bfe0

Please sign in to comment.