Add tests for getSessionId helper

This commit is contained in:
Dan Sosedoff
2016-02-26 08:48:55 -08:00
parent 86f63eecc5
commit c57b477dc9
4 changed files with 21 additions and 7 deletions

View File

@@ -32,7 +32,7 @@ func dbCheckMiddleware() gin.HandlerFunc {
return
}
sessionId := getSessionId(c)
sessionId := getSessionId(c.Request)
if sessionId == "" {
c.JSON(400, Error{"Session ID is required"})
c.Abort()