2017-04-19 18:19:27 +08:00
|
|
|
package routers
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/astaxie/beego"
|
|
|
|
"github.com/lifei6671/godoc/controllers"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
beego.Router("/",&controllers.HomeController{},"*:Index")
|
|
|
|
|
2017-04-21 18:20:35 +08:00
|
|
|
beego.Router("/login", &controllers.AccountController{},"*:Login")
|
|
|
|
beego.Router("/logout", &controllers.AccountController{},"*:Logout")
|
|
|
|
beego.Router("/register", &controllers.AccountController{},"*:Register")
|
|
|
|
beego.Router("/find_password", &controllers.AccountController{},"*:FindPassword")
|
2017-05-03 14:22:05 +08:00
|
|
|
beego.Router("/valid_email", &controllers.AccountController{},"post:ValidEmail")
|
2017-04-30 22:13:12 +08:00
|
|
|
beego.Router("/captcha", &controllers.AccountController{},"*:Captcha")
|
2017-04-21 18:20:35 +08:00
|
|
|
|
2017-04-19 18:19:27 +08:00
|
|
|
beego.Router("/manager", &controllers.ManagerController{},"*:Index")
|
2017-04-30 22:13:12 +08:00
|
|
|
beego.Router("/manager/users", &controllers.ManagerController{},"*:Users")
|
2017-04-24 18:25:17 +08:00
|
|
|
beego.Router("/manager/member/create", &controllers.ManagerController{},"post:CreateMember")
|
|
|
|
beego.Router("/manager/member/update-member-status",&controllers.ManagerController{},"post:UpdateMemberStatus")
|
2017-04-25 20:05:59 +08:00
|
|
|
beego.Router("/manager/member/change-member-role", &controllers.ManagerController{},"post:ChangeMemberRole")
|
2017-04-24 18:25:17 +08:00
|
|
|
beego.Router("/manager/books", &controllers.ManagerController{},"*:Books")
|
|
|
|
beego.Router("/manager/books/edit/:key", &controllers.ManagerController{},"*:EditBook")
|
|
|
|
beego.Router("/manager/comments", &controllers.ManagerController{},"*:Comments")
|
2017-04-25 20:05:59 +08:00
|
|
|
beego.Router("/manager/books/token", &controllers.ManagerController{},"post:CreateToken")
|
2017-04-26 18:17:38 +08:00
|
|
|
beego.Router("/manager/setting",&controllers.ManagerController{},"*:Setting")
|
2017-04-20 18:19:32 +08:00
|
|
|
|
|
|
|
beego.Router("/setting", &controllers.SettingController{},"*:Index")
|
|
|
|
beego.Router("/setting/password", &controllers.SettingController{},"*:Password")
|
2017-04-21 18:20:35 +08:00
|
|
|
beego.Router("/setting/upload", &controllers.SettingController{},"*:Upload")
|
2017-04-20 18:19:32 +08:00
|
|
|
|
|
|
|
beego.Router("/book", &controllers.BookController{},"*:Index")
|
|
|
|
beego.Router("/book/:key/dashboard", &controllers.BookController{},"*:Dashboard")
|
|
|
|
beego.Router("/book/:key/setting", &controllers.BookController{},"*:Setting")
|
|
|
|
beego.Router("/book/:key/users", &controllers.BookController{},"*:Users")
|
2017-04-29 21:28:09 +08:00
|
|
|
beego.Router("/book/:key/release", &controllers.BookController{},"post:Release")
|
|
|
|
beego.Router("/book/:key/sort", &controllers.BookController{},"post:SaveSort")
|
2017-04-26 18:17:38 +08:00
|
|
|
|
2017-04-20 18:19:32 +08:00
|
|
|
beego.Router("/book/create", &controllers.BookController{},"*:Create")
|
2017-04-26 18:17:38 +08:00
|
|
|
beego.Router("/book/users/create", &controllers.BookMemberController{},"post:AddMember")
|
|
|
|
beego.Router("/book/users/change", &controllers.BookMemberController{},"post:ChangeRole")
|
|
|
|
beego.Router("/book/users/delete", &controllers.BookMemberController{},"post:RemoveMember")
|
2017-04-25 20:05:59 +08:00
|
|
|
|
|
|
|
beego.Router("/book/setting/save", &controllers.BookController{},"post:SaveBook")
|
|
|
|
beego.Router("/book/setting/open", &controllers.BookController{},"post:PrivatelyOwned")
|
|
|
|
beego.Router("/book/setting/transfer", &controllers.BookController{},"post:Transfer")
|
|
|
|
beego.Router("/book/setting/upload", &controllers.BookController{},"post:UploadCover")
|
|
|
|
beego.Router("/book/setting/token", &controllers.BookController{},"post:CreateToken")
|
|
|
|
beego.Router("/book/setting/delete", &controllers.BookController{},"post:Delete")
|
2017-04-20 18:19:32 +08:00
|
|
|
|
2017-04-30 22:13:12 +08:00
|
|
|
beego.Router("/api/:key/edit/?:id", &controllers.DocumentController{},"*:Edit")
|
|
|
|
beego.Router("/api/upload",&controllers.DocumentController{},"post:Upload")
|
|
|
|
beego.Router("/api/:key/create",&controllers.DocumentController{},"post:Create")
|
|
|
|
beego.Router("/api/:key/delete", &controllers.DocumentController{},"post:Delete")
|
|
|
|
beego.Router("/api/:key/content/?:id",&controllers.DocumentController{},"*:Content")
|
2017-04-26 18:17:38 +08:00
|
|
|
|
2017-04-20 18:19:32 +08:00
|
|
|
|
|
|
|
beego.Router("/docs/:key", &controllers.DocumentController{},"*:Index")
|
|
|
|
beego.Router("/docs/:key/:id", &controllers.DocumentController{},"*:Read")
|
2017-04-27 18:19:37 +08:00
|
|
|
|
2017-04-30 22:13:12 +08:00
|
|
|
beego.Router("/attach_files/:key/:attach_id",&controllers.DocumentController{},"get:DownloadAttachment")
|
2017-05-01 19:12:52 +08:00
|
|
|
|
|
|
|
beego.Router("/comment/create", &controllers.CommentController{},"post:Create")
|
|
|
|
beego.Router("/comment/lists", &controllers.CommentController{},"get:Lists")
|
|
|
|
beego.Router("/comment/index", &controllers.CommentController{},"*:Index")
|
2017-05-02 18:09:46 +08:00
|
|
|
|
|
|
|
beego.Router("/search",&controllers.SearchController{},"get:Index")
|
2017-04-19 18:19:27 +08:00
|
|
|
}
|
2017-05-02 18:09:46 +08:00
|
|
|
|