@@ -0,0 +1,107 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"91porn-server/web/api/officialWebsitectrl"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
const (
|
||||
officialWebsitePathList = "/list"
|
||||
officialWebsitePathCreate = "/create"
|
||||
officialWebsitePathUpdate = "/update"
|
||||
officialWebsitePathDelete = "/delete"
|
||||
)
|
||||
|
||||
func newOfficialWebsiteRoute(router *gin.RouterGroup) {
|
||||
g := router.Group("/officialWebsite")
|
||||
{
|
||||
g.GET("", officialWebsitectrl.GetBasicData) // 品牌站基础数据接口,包含基础静态数据和CMS动态数据
|
||||
g.POST("", officialWebsitectrl.CreateBasicData)
|
||||
g.PUT("", officialWebsitectrl.UpdateBasicData)
|
||||
g.DELETE("", officialWebsitectrl.DeleteBasicData)
|
||||
|
||||
hero := g.Group("/hero")
|
||||
{
|
||||
hero.GET(officialWebsitePathList, officialWebsitectrl.ListHero)
|
||||
hero.POST(officialWebsitePathCreate, officialWebsitectrl.CreateHero)
|
||||
hero.PUT(officialWebsitePathUpdate, officialWebsitectrl.UpdateHero)
|
||||
hero.DELETE(officialWebsitePathDelete, officialWebsitectrl.DeleteHero)
|
||||
}
|
||||
|
||||
album := g.Group("/album")
|
||||
{
|
||||
album.GET(officialWebsitePathList, officialWebsitectrl.ListAlbum)
|
||||
album.POST(officialWebsitePathCreate, officialWebsitectrl.CreateAlbum)
|
||||
album.PUT(officialWebsitePathUpdate, officialWebsitectrl.UpdateAlbum)
|
||||
album.DELETE(officialWebsitePathDelete, officialWebsitectrl.DeleteAlbum)
|
||||
}
|
||||
|
||||
video := g.Group("/video")
|
||||
{
|
||||
video.GET(officialWebsitePathList, officialWebsitectrl.ListVideo)
|
||||
video.POST(officialWebsitePathCreate, officialWebsitectrl.CreateVideo)
|
||||
video.PUT(officialWebsitePathUpdate, officialWebsitectrl.UpdateVideo)
|
||||
video.DELETE(officialWebsitePathDelete, officialWebsitectrl.DeleteVideo)
|
||||
video.GET("/listFromVid", officialWebsitectrl.ListVideoFromVid)
|
||||
video.PUT("/batch", officialWebsitectrl.BatchUpdateVideos)
|
||||
video.PUT("/import", officialWebsitectrl.BatchImportVideos)
|
||||
}
|
||||
|
||||
photograph := g.Group("/photograph")
|
||||
{
|
||||
photograph.GET(officialWebsitePathList, officialWebsitectrl.ListPhotograph)
|
||||
photograph.POST(officialWebsitePathCreate, officialWebsitectrl.CreatePhotograph)
|
||||
photograph.PUT(officialWebsitePathUpdate, officialWebsitectrl.UpdatePhotograph)
|
||||
photograph.DELETE(officialWebsitePathDelete, officialWebsitectrl.DeletePhotograph)
|
||||
photograph.PUT("/batch", officialWebsitectrl.BatchUpdatePhotograph)
|
||||
}
|
||||
|
||||
tag := g.Group("/tag")
|
||||
{
|
||||
tag.GET(officialWebsitePathList, officialWebsitectrl.ListTag)
|
||||
tag.POST(officialWebsitePathCreate, officialWebsitectrl.CreateTag)
|
||||
tag.PUT(officialWebsitePathUpdate, officialWebsitectrl.UpdateTag)
|
||||
tag.DELETE(officialWebsitePathDelete, officialWebsitectrl.DeleteTag)
|
||||
}
|
||||
|
||||
recruitForm := g.Group("/recruitForm")
|
||||
{
|
||||
recruitForm.GET(officialWebsitePathList, officialWebsitectrl.ListRecruitForm)
|
||||
recruitForm.PUT(officialWebsitePathUpdate, officialWebsitectrl.UpdateRecruitForm)
|
||||
recruitForm.DELETE(officialWebsitePathDelete, officialWebsitectrl.DeleteRecruitForm)
|
||||
}
|
||||
|
||||
jobList := g.Group("/jobList")
|
||||
{
|
||||
jobList.GET(officialWebsitePathList, officialWebsitectrl.ListJobList)
|
||||
jobList.POST(officialWebsitePathCreate, officialWebsitectrl.CreateJobList)
|
||||
jobList.PUT(officialWebsitePathUpdate, officialWebsitectrl.UpdateJobList)
|
||||
jobList.DELETE(officialWebsitePathDelete, officialWebsitectrl.DeleteJobList)
|
||||
}
|
||||
|
||||
news := g.Group("/news")
|
||||
{
|
||||
news.GET(officialWebsitePathList, officialWebsitectrl.ListNews)
|
||||
news.POST(officialWebsitePathCreate, officialWebsitectrl.CreateNews)
|
||||
news.PUT(officialWebsitePathUpdate, officialWebsitectrl.UpdateNews)
|
||||
news.DELETE(officialWebsitePathDelete, officialWebsitectrl.DeleteNews)
|
||||
}
|
||||
|
||||
partner := g.Group("/partner")
|
||||
{
|
||||
partner.GET(officialWebsitePathList, officialWebsitectrl.ListPartner)
|
||||
partner.POST(officialWebsitePathCreate, officialWebsitectrl.CreatePartner)
|
||||
partner.PUT(officialWebsitePathUpdate, officialWebsitectrl.UpdatePartner)
|
||||
partner.DELETE(officialWebsitePathDelete, officialWebsitectrl.DeletePartner)
|
||||
}
|
||||
|
||||
business := g.Group("/business")
|
||||
{
|
||||
business.GET(officialWebsitePathList, officialWebsitectrl.ListBusiness)
|
||||
business.POST(officialWebsitePathCreate, officialWebsitectrl.CreateBusiness)
|
||||
business.PUT(officialWebsitePathUpdate, officialWebsitectrl.UpdateBusiness)
|
||||
business.DELETE(officialWebsitePathDelete, officialWebsitectrl.DeleteBusiness)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user