Upgraded to latest aero version

This commit is contained in:
2019-06-01 13:55:49 +09:00
parent ae591e5e7e
commit 28db818c37
196 changed files with 645 additions and 593 deletions

View File

@ -29,7 +29,7 @@ var jobInfo = map[string]*utils.JobInfo{
var jobLogs = []string{}
// Overview shows all background jobs.
func Overview(ctx *aero.Context) string {
func Overview(ctx aero.Context) error {
user := utils.GetUser(ctx)
jobs := []*utils.JobInfo{}
@ -41,5 +41,5 @@ func Overview(ctx *aero.Context) string {
return jobs[i].Name < jobs[j].Name
})
return ctx.HTML(components.EditorJobs(jobs, jobLogs, ctx.URI(), user))
return ctx.HTML(components.EditorJobs(jobs, jobLogs, ctx.Path(), user))
}

View File

@ -14,7 +14,7 @@ import (
var jobStartMutex sync.Mutex
// Start will start the specified background job.
func Start(ctx *aero.Context) string {
func Start(ctx aero.Context) error {
jobStartMutex.Lock()
defer jobStartMutex.Unlock()
@ -38,5 +38,5 @@ func Start(ctx *aero.Context) string {
job.Start()
jobLogs = append(jobLogs, user.Nick+" started "+job.Name+" job ("+arn.DateTimeUTC()+").")
return "ok"
return nil
}