models/issue: improve quality and performance of NewIssue function

This commit is contained in:
Unknwon 2016-08-15 18:40:32 -07:00
parent 4a46613916
commit 4042d1f0c3
13 changed files with 146 additions and 173 deletions

View file

@ -504,10 +504,9 @@ func runWeb(ctx *cli.Context) error {
m.Combo("/_new/*").Get(repo.NewFile).
Post(bindIgnErr(auth.EditRepoFileForm{}), repo.NewFilePost)
m.Post("/_preview/*", bindIgnErr(auth.EditPreviewDiffForm{}), repo.DiffPreviewPost)
m.Combo("/upload/*").Get(repo.UploadFile).
m.Combo("/_upload/*").Get(repo.UploadFile).
Post(bindIgnErr(auth.UploadRepoFileForm{}), repo.UploadFilePost)
m.Post("/_delete/*", bindIgnErr(auth.DeleteRepoFileForm{}), repo.DeleteFilePost)
m.Post("/branches", bindIgnErr(auth.NewBranchForm{}), repo.NewBranchPost)
// m.Post("/upload-file", repo.UploadFileToServer)
// m.Post("/upload-remove", bindIgnErr(auth.RemoveUploadFileForm{}), repo.RemoveUploadFileFromServer)
}, reqRepoWriter, context.RepoRef(), func(ctx *context.Context) {