37 lines
672 B
Go
37 lines
672 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func login(c *gin.Context) {
|
|
// log the user into their account
|
|
}
|
|
|
|
func getTasks(c *gin.Context) {
|
|
// return a list of all of the tasks
|
|
}
|
|
|
|
func completeTask(c *gin.Context) {
|
|
// complete a task in the history log
|
|
}
|
|
|
|
func getHistory(c *gin.Context) {
|
|
// get the log of past points gained
|
|
}
|
|
|
|
func addTask(c *gin.Context) {
|
|
// add a task to the list of tasks
|
|
}
|
|
|
|
func main() {
|
|
router := gin.Default()
|
|
router.POST("/login", login)
|
|
router.GET("/getTasks", getTasks)
|
|
router.POST("/completeTask", completeTask)
|
|
router.POST("/addTask", addTask)
|
|
router.GET("/getHistory", getHistory)
|
|
|
|
router.Run("localhost:8080")
|
|
}
|