2014-10-23 10:10:12 +08:00
|
|
|
# Routes
|
|
|
|
# This file defines all application routes (Higher priority routes first)
|
|
|
|
# ~~~~
|
|
|
|
|
2015-09-18 13:44:25 +08:00
|
|
|
# module:testrunner
|
2014-10-23 10:10:12 +08:00
|
|
|
|
|
|
|
# Home is My Blog
|
2015-03-31 17:52:18 +08:00
|
|
|
Get / Index.Default
|
2014-10-23 10:10:12 +08:00
|
|
|
GET /note Note.Index
|
|
|
|
# leanote home
|
|
|
|
GET /index Index.Index
|
|
|
|
|
|
|
|
GET /login Auth.Login
|
|
|
|
POST /doLogin Auth.DoLogin
|
|
|
|
GET /logout Auth.Logout
|
|
|
|
Get /demo Auth.Demo
|
|
|
|
|
|
|
|
Get /register Auth.Register
|
|
|
|
POST /doRegister Auth.DoRegister
|
|
|
|
|
|
|
|
GET /findPassword/:token Auth.FindPassword2
|
|
|
|
GET /findPassword Auth.FindPassword
|
|
|
|
POST /doFindPassword Auth.DoFindPassword
|
|
|
|
POST /findPasswordUpdate Auth.FindPasswordUpdate
|
|
|
|
|
2015-01-08 23:29:24 +08:00
|
|
|
#####
|
|
|
|
# 这么多列表, 只是为了最后一句pjax
|
|
|
|
# note
|
|
|
|
* /note/listNotes Note.ListNotes
|
|
|
|
* /note/listTrashNotes Note.ListTrashNotes
|
|
|
|
* /note/getNoteAndContent Note.GetNoteAndContent
|
|
|
|
* /note/getNoteContent Note.GetNoteContent
|
|
|
|
* /note/updateNoteOrContent Note.UpdateNoteOrContent
|
|
|
|
* /note/deleteNote Note.DeleteNote
|
|
|
|
* /note/deleteTrash Note.DeleteTrash
|
|
|
|
* /note/moveNote Note.MoveNote
|
|
|
|
* /note/copyNote Note.CopyNote
|
|
|
|
* /note/copySharedNote Note.CopySharedNote
|
|
|
|
* /note/searchNoteByTags Note.SearchNoteByTags
|
|
|
|
* /note/setNote2Blog Note.SetNote2Blog
|
2015-10-17 17:15:33 +08:00
|
|
|
* /note/exportPdf Note.ExportPDF
|
|
|
|
* /note/toPdf Note.ToPdf
|
2017-02-18 20:01:14 +08:00
|
|
|
* /note/getNoteAndContentBySrc Note.GetNoteAndContentBySrc
|
2015-01-08 23:29:24 +08:00
|
|
|
# pjax
|
|
|
|
GET /note/:noteId Note.Index
|
2014-11-12 17:32:03 +08:00
|
|
|
|
2014-10-23 10:10:12 +08:00
|
|
|
# blog
|
|
|
|
|
2014-11-09 16:24:19 +08:00
|
|
|
GET /blog/getLikesAndComments Blog.GetLikesAndComments
|
|
|
|
GET /blog/getLikes Blog.GetLikes
|
|
|
|
* /blog/incReadNum Blog.IncReadNum
|
|
|
|
* /blog/likePost Blog.LikePost
|
|
|
|
* /blog/likeComment Blog.LikeComment
|
|
|
|
* /blog/deleteComment Blog.DeleteComment
|
|
|
|
GET /blog/getComments Blog.GetComments
|
|
|
|
* /blog/commentPost Blog.CommentPost
|
|
|
|
GET /blog/getPostStat Blog.GetPostStat
|
2014-10-23 10:10:12 +08:00
|
|
|
|
|
|
|
|
2014-11-09 16:24:19 +08:00
|
|
|
GET /blog/tags/:userIdOrEmail Blog.Tags
|
|
|
|
GET /blog/tags Blog.Tags
|
|
|
|
|
|
|
|
GET /blog/tag/:userIdOrEmail/:tag Blog.Tag
|
|
|
|
GET /blog/tag/:tag Blog.Tag
|
|
|
|
|
2014-10-23 10:10:12 +08:00
|
|
|
GET /blog/search/:userIdOrEmail Blog.Search
|
|
|
|
GET /blog/search Blog.Search
|
2014-11-09 16:24:19 +08:00
|
|
|
|
2014-11-12 17:32:03 +08:00
|
|
|
GET /blog/archives/:userIdOrEmail Blog.Archives
|
|
|
|
GET /blog/archives Blog.Archives
|
2014-11-09 16:24:19 +08:00
|
|
|
|
|
|
|
GET /blog/post/:noteId Blog.Post
|
2014-11-12 17:32:03 +08:00
|
|
|
GET /blog/post/:userIdOrEmail/:noteId Blog.Post
|
2014-11-09 16:24:19 +08:00
|
|
|
GET /blog/view/:noteId Blog.Post
|
2014-11-12 17:32:03 +08:00
|
|
|
|
|
|
|
GET /blog/single/:userIdOrEmail/:singleId Blog.Single
|
2014-11-09 16:24:19 +08:00
|
|
|
GET /blog/single/:singleId Blog.Single
|
|
|
|
|
2014-10-23 10:10:12 +08:00
|
|
|
GET /blog/cate/:notebookId Blog.Cate
|
2014-11-12 17:32:03 +08:00
|
|
|
GET /blog/cate/:userIdOrEmail/:notebookId Blog.Cate
|
|
|
|
|
2014-10-23 10:10:12 +08:00
|
|
|
GET /blog/listCateLatest/:notebookId Blog.ListCateLatest
|
|
|
|
GET /blog/:userIdOrEmail Blog.Index
|
|
|
|
GET /blog Blog.Index
|
2014-11-09 16:24:19 +08:00
|
|
|
GET /blog/* Blog.E()
|
|
|
|
|
|
|
|
#---------------
|
|
|
|
# preview
|
|
|
|
GET /preview/tags/:userIdOrEmail Preview.Tags
|
|
|
|
GET /preview/tags Preview.Tags
|
|
|
|
|
|
|
|
GET /preview/tag/:userIdOrEmail/:tag Preview.Tag
|
|
|
|
GET /preview/tag/:tag Preview.Tag
|
|
|
|
|
|
|
|
GET /preview/search/:userIdOrEmail Preview.Search
|
|
|
|
GET /preview/search Preview.Search
|
|
|
|
|
2014-11-12 17:32:03 +08:00
|
|
|
GET /preview/archives/:userIdOrEmail Preview.Archives
|
|
|
|
GET /preview/archives Preview.Archives
|
2014-11-09 16:24:19 +08:00
|
|
|
|
|
|
|
GET /preview/view/:noteId Preview.Post
|
2014-11-12 17:32:03 +08:00
|
|
|
|
2014-11-09 16:24:19 +08:00
|
|
|
GET /preview/post/:noteId Preview.Post
|
2014-11-13 12:35:48 +08:00
|
|
|
GET /preview/post/:userIdOrEmail/:noteId Preview.Post
|
2014-11-12 17:32:03 +08:00
|
|
|
|
2014-11-13 12:35:48 +08:00
|
|
|
GET /preview/single/:userIdOrEmail/:singleId Preview.Single
|
2014-11-09 16:24:19 +08:00
|
|
|
GET /preview/single/:singleId Preview.Single
|
|
|
|
|
|
|
|
GET /preview/cate/:notebookId Preview.Cate
|
2014-11-13 12:35:48 +08:00
|
|
|
GET /preview/cate/:userIdOrEmail/:notebookId Preview.Cate
|
2014-11-12 17:32:03 +08:00
|
|
|
|
2014-11-09 16:24:19 +08:00
|
|
|
GET /preview/:userIdOrEmail Preview.Index
|
|
|
|
GET /preview Preview.Index
|
2014-10-23 10:10:12 +08:00
|
|
|
|
|
|
|
# Map static resources from the /app/public folder to the /public path
|
|
|
|
GET /favicon.ico Static.Serve("public/images/favicon.ico")
|
|
|
|
GET /public/*filepath Static.Serve("public")
|
|
|
|
GET /js/*filepath Static.Serve("public/js")
|
|
|
|
GET /images/*filepath Static.Serve("public/images")
|
|
|
|
GET /img/*filepath Static.Serve("public/img")
|
|
|
|
GET /css/*filepath Static.Serve("public/css")
|
|
|
|
GET /fonts/*filepath Static.Serve("public/fonts")
|
|
|
|
GET /tinymce/*filepath Static.Serve("public/tinymce")
|
|
|
|
#GET /plugins/*filepath Static.Serve("public/tinymce/plugins")
|
|
|
|
GET /upload/*filepath Static.Serve("public/upload")
|
|
|
|
|
2014-11-09 16:24:19 +08:00
|
|
|
# member
|
|
|
|
# the prefix of member's controllername is "Member"
|
|
|
|
* /member MemberIndex.Index
|
|
|
|
* /member/index MemberIndex.Index
|
2017-11-30 18:46:30 +08:00
|
|
|
|
|
|
|
# 不知道为什么, group就是不行 member/blog可以
|
2017-11-30 18:10:59 +08:00
|
|
|
* /member/group/index MemberGroup.Index
|
|
|
|
* /member/group/addGroup MemberGroup.AddGroup
|
|
|
|
* /member/group/updateGroupTitle MemberGroup.UpdateGroupTitle
|
|
|
|
* /member/group/deleteGroup MemberGroup.DeleteGroup
|
|
|
|
* /member/group/addUser MemberGroup.AddUser
|
|
|
|
* /member/group/deleteUser MemberGroup.DeleteUser
|
2014-10-26 11:19:27 +08:00
|
|
|
|
2014-10-23 10:10:12 +08:00
|
|
|
# common
|
|
|
|
* /:controller/:action :controller.:action
|
2014-11-09 16:24:19 +08:00
|
|
|
* /api/:controller/:action :controller.:action
|
2015-01-08 23:29:24 +08:00
|
|
|
* /member/:controller/:action :controller.:action
|