Retrieve time through X-FIC-Time header instead of time.json
This commit is contained in:
parent
c33390fa80
commit
6034246015
11 changed files with 107 additions and 131 deletions
|
@ -6,12 +6,10 @@ import (
|
|||
"path"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
fronttime "srs.epita.fr/fic-server/frontend/time"
|
||||
)
|
||||
|
||||
func SubmissionHandler(w http.ResponseWriter, r *http.Request, team string, sURL []string) {
|
||||
if time.Now().Sub(fronttime.ChallengeEnd) > 0 {
|
||||
if time.Now().Sub(challengeEnd) > 0 {
|
||||
http.Error(w, "{\"errmsg\":\"Vous ne pouvez plus soumettre, le challenge est terminé.\"}", http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
|
|
Reference in a new issue