qa: Use gin
This commit is contained in:
parent
9fd5564410
commit
abdf146fea
13 changed files with 596 additions and 378 deletions
|
@ -1,11 +1,16 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"github.com/julienschmidt/httprouter"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
var router = httprouter.New()
|
||||
func DeclareRoutes(router *gin.RouterGroup) {
|
||||
apiRoutes := router.Group("/api")
|
||||
apiRoutes.Use(authMiddleware())
|
||||
|
||||
func Router() *httprouter.Router {
|
||||
return router
|
||||
declareExercicesRoutes(apiRoutes)
|
||||
declareQARoutes(apiRoutes)
|
||||
declareThemesRoutes(apiRoutes)
|
||||
declareTodoRoutes(apiRoutes)
|
||||
declareVersionRoutes(apiRoutes)
|
||||
}
|
||||
|
|
Reference in a new issue