modify info
This commit is contained in:
parent
aa58caeaf7
commit
8ee9955c8a
|
@ -112,7 +112,7 @@ func GetContentsOrList(repo *models.Repository, treePath, ref string) (interface
|
|||
fileContentResponse.LatestCommit = api.ContentsResponseCommit{
|
||||
Message: entryCommit.CommitMessage,
|
||||
LatestCommitSha: entryCommit.ID.String(),
|
||||
Time: entryCommit.Author.When,
|
||||
Time: entryCommit.Author.When.Unix(),
|
||||
}
|
||||
break
|
||||
}
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
package structs
|
||||
|
||||
import "time"
|
||||
|
||||
// FileOptions options for all file APIs
|
||||
type FileOptions struct {
|
||||
// message (optional) for the commit of this file. if not supplied, a default message will be used
|
||||
|
@ -61,7 +59,7 @@ type FileLinksResponse struct {
|
|||
type ContentsResponseCommit struct {
|
||||
Message string `json:"message"`
|
||||
LatestCommitSha string `json:"sha"`
|
||||
Time time.Time `json:"time"`
|
||||
Created int64 `json:"created"`
|
||||
}
|
||||
//end by qiubing
|
||||
|
||||
|
|
|
@ -654,7 +654,7 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||
|
||||
// add by qiubing
|
||||
m.Get("/graph", repo.GetGraph)
|
||||
m.Get("/commits/diff/:sha([a-f0-9]{7,40})$", repo.Diff)
|
||||
m.Get("/commits/:sha([a-f0-9]{7,40})$/diff", repo.Diff)
|
||||
m.Group("/blame", func() {
|
||||
m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.RefBlame)
|
||||
m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.RefBlame)
|
||||
|
|
Loading…
Reference in New Issue