@ -8,11 +8,18 @@ import (
)
// RenderBranchFeed render format for branch or file
func RenderBranchFeed ( ctx * context . Context ) {
_ , showFeedType := GetFeedType ( ctx . PathParam ( "reponame" ) , ctx . Req )
func RenderBranchFeed ( ctx * context . Context , feedType string ) {
if ctx . Repo . TreePath == "" {
ShowBranchFeed ( ctx , ctx . Repo . Repository , showF eedType)
ShowBranchFeed ( ctx , ctx . Repo . Repository , f eedType)
} else {
ShowFileFeed ( ctx , ctx . Repo . Repository , showF eedType)
ShowFileFeed ( ctx , ctx . Repo . Repository , f eedType)
}
}
func RenderBranchFeedRSS ( ctx * context . Context ) {
RenderBranchFeed ( ctx , "rss" )
}
func RenderBranchFeedAtom ( ctx * context . Context ) {
RenderBranchFeed ( ctx , "atom" )
}