Skip to content

Commit

Permalink
Update router.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Achuan-2 authored Oct 27, 2024
1 parent ef76540 commit a60505a
Showing 1 changed file with 28 additions and 27 deletions.
55 changes: 28 additions & 27 deletions kernel/api/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ func ServeAPI(ginServer *gin.Engine) {
ginServer.Handle("POST", "/api/system/loginAuth", model.LoginAuth)
ginServer.Handle("POST", "/api/system/logoutAuth", model.LogoutAuth)
ginServer.Handle("GET", "/api/system/getCaptcha", model.GetCaptcha)
ginServer.Handle("GET", "/api/icon/getDynamicIcon", getDynamicIcon) // 添加动态图标路由
ginServer.Handle("GET", "/api/icon/getDynamicIcon", getDynamicIcon) // 添加动态图标路由

// 需要鉴权

ginServer.Handle("POST", "/api/system/getEmojiConf", model.CheckAuth, getEmojiConf)
Expand Down Expand Up @@ -90,7 +91,7 @@ func ServeAPI(ginServer *gin.Engine) {
ginServer.Handle("POST", "/api/notebook/renameNotebook", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, renameNotebook)
ginServer.Handle("POST", "/api/notebook/changeSortNotebook", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, changeSortNotebook)
ginServer.Handle("POST", "/api/notebook/setNotebookIcon", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, setNotebookIcon)
ginServer.Handle("POST", "/api/notebook/getNotebookInfo", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, getNotebookInfo)
ginServer.Handle("POST", "/api/notebook/getNotebookInfo", model.CheckAuth, model.CheckReadonly, getNotebookInfo)

ginServer.Handle("POST", "/api/filetree/searchDocs", model.CheckAuth, searchDocs)
ginServer.Handle("POST", "/api/filetree/listDocsByPath", model.CheckAuth, listDocsByPath)
Expand Down Expand Up @@ -276,33 +277,33 @@ func ServeAPI(ginServer *gin.Engine) {
ginServer.Handle("POST", "/api/asset/fullReindexAssetContent", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, fullReindexAssetContent)
ginServer.Handle("POST", "/api/asset/statAsset", model.CheckAuth, model.CheckAdminRole, statAsset)

ginServer.Handle("POST", "/api/export/batchExportMd", model.CheckAuth, batchExportMd)
ginServer.Handle("POST", "/api/export/exportMd", model.CheckAuth, exportMd)
ginServer.Handle("POST", "/api/export/exportSY", model.CheckAuth, exportSY)
ginServer.Handle("POST", "/api/export/exportNotebookSY", model.CheckAuth, exportNotebookSY)
ginServer.Handle("POST", "/api/export/exportMdContent", model.CheckAuth, exportMdContent)
ginServer.Handle("POST", "/api/export/exportHTML", model.CheckAuth, exportHTML)
ginServer.Handle("POST", "/api/export/exportPreviewHTML", model.CheckAuth, exportPreviewHTML)
ginServer.Handle("POST", "/api/export/exportMdHTML", model.CheckAuth, exportMdHTML)
ginServer.Handle("POST", "/api/export/exportDocx", model.CheckAuth, exportDocx)
ginServer.Handle("POST", "/api/export/processPDF", model.CheckAuth, processPDF)
ginServer.Handle("POST", "/api/export/batchExportMd", model.CheckAuth, model.CheckAdminRole, batchExportMd)
ginServer.Handle("POST", "/api/export/exportMd", model.CheckAuth, model.CheckAdminRole, exportMd)
ginServer.Handle("POST", "/api/export/exportSY", model.CheckAuth, model.CheckAdminRole, exportSY)
ginServer.Handle("POST", "/api/export/exportNotebookSY", model.CheckAuth, model.CheckAdminRole, exportNotebookSY)
ginServer.Handle("POST", "/api/export/exportMdContent", model.CheckAuth, model.CheckAdminRole, exportMdContent)
ginServer.Handle("POST", "/api/export/exportHTML", model.CheckAuth, model.CheckAdminRole, exportHTML)
ginServer.Handle("POST", "/api/export/exportPreviewHTML", model.CheckAuth, model.CheckAdminRole, exportPreviewHTML)
ginServer.Handle("POST", "/api/export/exportMdHTML", model.CheckAuth, model.CheckAdminRole, exportMdHTML)
ginServer.Handle("POST", "/api/export/exportDocx", model.CheckAuth, model.CheckAdminRole, exportDocx)
ginServer.Handle("POST", "/api/export/processPDF", model.CheckAuth, model.CheckAdminRole, processPDF)
ginServer.Handle("POST", "/api/export/preview", model.CheckAuth, exportPreview)
ginServer.Handle("POST", "/api/export/exportResources", model.CheckAuth, exportResources)
ginServer.Handle("POST", "/api/export/exportAsFile", model.CheckAuth, exportAsFile)
ginServer.Handle("POST", "/api/export/exportData", model.CheckAuth, exportData)
ginServer.Handle("POST", "/api/export/exportDataInFolder", model.CheckAuth, exportDataInFolder)
ginServer.Handle("POST", "/api/export/exportTempContent", model.CheckAuth, exportTempContent)
ginServer.Handle("POST", "/api/export/exportResources", model.CheckAuth, model.CheckAdminRole, exportResources)
ginServer.Handle("POST", "/api/export/exportAsFile", model.CheckAuth, model.CheckAdminRole, exportAsFile)
ginServer.Handle("POST", "/api/export/exportData", model.CheckAuth, model.CheckAdminRole, exportData)
ginServer.Handle("POST", "/api/export/exportDataInFolder", model.CheckAuth, model.CheckAdminRole, exportDataInFolder)
ginServer.Handle("POST", "/api/export/exportTempContent", model.CheckAuth, model.CheckAdminRole, exportTempContent)
ginServer.Handle("POST", "/api/export/export2Liandi", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, export2Liandi)
ginServer.Handle("POST", "/api/export/exportReStructuredText", model.CheckAuth, exportReStructuredText)
ginServer.Handle("POST", "/api/export/exportAsciiDoc", model.CheckAuth, exportAsciiDoc)
ginServer.Handle("POST", "/api/export/exportTextile", model.CheckAuth, exportTextile)
ginServer.Handle("POST", "/api/export/exportOPML", model.CheckAuth, exportOPML)
ginServer.Handle("POST", "/api/export/exportOrgMode", model.CheckAuth, exportOrgMode)
ginServer.Handle("POST", "/api/export/exportMediaWiki", model.CheckAuth, exportMediaWiki)
ginServer.Handle("POST", "/api/export/exportODT", model.CheckAuth, exportODT)
ginServer.Handle("POST", "/api/export/exportRTF", model.CheckAuth, exportRTF)
ginServer.Handle("POST", "/api/export/exportEPUB", model.CheckAuth, exportEPUB)
ginServer.Handle("POST", "/api/export/exportAttributeView", model.CheckAuth, exportAttributeView)
ginServer.Handle("POST", "/api/export/exportReStructuredText", model.CheckAuth, model.CheckAdminRole, exportReStructuredText)
ginServer.Handle("POST", "/api/export/exportAsciiDoc", model.CheckAuth, model.CheckAdminRole, exportAsciiDoc)
ginServer.Handle("POST", "/api/export/exportTextile", model.CheckAuth, model.CheckAdminRole, exportTextile)
ginServer.Handle("POST", "/api/export/exportOPML", model.CheckAuth, model.CheckAdminRole, exportOPML)
ginServer.Handle("POST", "/api/export/exportOrgMode", model.CheckAuth, model.CheckAdminRole, exportOrgMode)
ginServer.Handle("POST", "/api/export/exportMediaWiki", model.CheckAuth, model.CheckAdminRole, exportMediaWiki)
ginServer.Handle("POST", "/api/export/exportODT", model.CheckAuth, model.CheckAdminRole, exportODT)
ginServer.Handle("POST", "/api/export/exportRTF", model.CheckAuth, model.CheckAdminRole, exportRTF)
ginServer.Handle("POST", "/api/export/exportEPUB", model.CheckAuth, model.CheckAdminRole, exportEPUB)
ginServer.Handle("POST", "/api/export/exportAttributeView", model.CheckAuth, model.CheckAdminRole, exportAttributeView)

ginServer.Handle("POST", "/api/import/importStdMd", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, importStdMd)
ginServer.Handle("POST", "/api/import/importData", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, importData)
Expand Down

0 comments on commit a60505a

Please sign in to comment.