mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-12 02:04:20 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
8979a8f840
2 changed files with 9 additions and 0 deletions
|
|
@ -141,6 +141,7 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||
ginServer.Handle("POST", "/api/lute/copyStdMarkdown", model.CheckAuth, copyStdMarkdown)
|
||||
|
||||
ginServer.Handle("POST", "/api/query/sql", model.CheckAuth, SQL)
|
||||
ginServer.Handle("POST", "/api/sqlite/flushTransaction", model.CheckAuth, model.CheckReadonly, flushTransaction)
|
||||
|
||||
ginServer.Handle("POST", "/api/search/searchTag", model.CheckAuth, searchTag)
|
||||
ginServer.Handle("POST", "/api/search/searchTemplate", model.CheckAuth, searchTemplate)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,14 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func flushTransaction(c *gin.Context) {
|
||||
// Add internal kernel API `/api/sqlite/flushTransaction` https://github.com/siyuan-note/siyuan/issues/10005
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
sql.FlushQueue()
|
||||
}
|
||||
|
||||
func SQL(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue