mirror of
https://github.com/cjdenio/jia.git
synced 2024-11-25 17:13:56 +00:00
CORS stuff
This commit is contained in:
parent
a4ecc652e3
commit
3342f3ed4a
1 changed files with 2 additions and 0 deletions
|
@ -38,6 +38,8 @@ func StartServer(config *Config) {
|
|||
http.HandleFunc("/slack/leaderboard", HandleLeaderboardSlashCommand)
|
||||
http.HandleFunc("/slack/eventsCommand", HandleEventsSlashCommand)
|
||||
http.HandleFunc("/api/currentNumber", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Add("Access-Control-Allow-Origin", "*")
|
||||
|
||||
number, err := redisClient.Get("last_valid_number").Int()
|
||||
if err != nil {
|
||||
w.WriteHeader(500)
|
||||
|
|
Loading…
Reference in a new issue