forked from drmly/drmly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.go
44 lines (41 loc) · 829 Bytes
/
routes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package main
import (
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)
func getIndex(c *gin.Context) {
c.HTML(200, "index.html", gin.H{
"v": version,
})
}
func postIndex(c *gin.Context) {
Log.Info("Is this exist?")
if isJob {
jobs := "one"
Log.WithFields(logrus.Fields{
"job": "mp42dream",
}).Info("added new job to queue")
c.HTML(200, "jobs.html", gin.H{
jobs: jobs,
})
} else {
Dream(c)
c.HTML(200, "jobs.html", gin.H{})
}
}
func getAbout(c *gin.Context) {
c.HTML(200, "about.html", gin.H{
"variableName": "value",
})
}
func getCode(c *gin.Context) {
c.HTML(200, "code.html", gin.H{
"variableName": "value",
})
}
func getJobs(c *gin.Context) {
c.HTML(200, "jobs.html", gin.H{
"jobs": "the job you just made is awesome!",
"est": "should be done in ten zetaseconds",
})
}