Example #1
0
func partyAPI(api *gin.RouterGroup) {
	api.GET("/party", func(c *gin.Context) {
		c.JSON(http.StatusOK, models.RetreiveAllParties())
	})
}
Example #2
0
func questionAPI(api *gin.RouterGroup) {
	api.GET("/question", func(c *gin.Context) {
		c.JSON(http.StatusOK, models.RetreiveAllQuestions(c.Query("area")))
	})
}
Example #3
0
func answerAPI(api *gin.RouterGroup) {
	api.GET("/answer", func(c *gin.Context) {
		c.JSON(http.StatusOK, models.RetreiveAllAnswers(c.Query("question")))
	})
}