update
parent
e938ae6101
commit
2af8820697
|
@ -62,8 +62,5 @@ func (srv Service) Load() error {
|
||||||
ctlAPI.GET("tasks", auth.ACAdmin(), func(c *gin.Context) {
|
ctlAPI.GET("tasks", auth.ACAdmin(), func(c *gin.Context) {
|
||||||
server.OK(c, task.GetProfile())
|
server.OK(c, task.GetProfile())
|
||||||
})
|
})
|
||||||
ctlAPI.GET("task", auth.ACAdmin(), func(c *gin.Context) {
|
|
||||||
server.OK(c, task.GetTasks())
|
|
||||||
})
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,13 +31,13 @@ type Report struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Profile struct {
|
type Profile struct {
|
||||||
Name string `json:"name"`
|
Tasks map[string]*Task
|
||||||
Scheduled []*Report `json:"scheduled"`
|
Scheduled []*Report `json:"scheduled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetProfile() *Profile {
|
func GetProfile() *Profile {
|
||||||
p := &Profile{
|
p := &Profile{
|
||||||
Name: "task",
|
Tasks: GetTasks(),
|
||||||
}
|
}
|
||||||
entries := c.Entries()
|
entries := c.Entries()
|
||||||
for i := 0; i < len(entries); i++ {
|
for i := 0; i < len(entries); i++ {
|
||||||
|
|
Loading…
Reference in New Issue