define event api

This commit is contained in:
BaoXuebin 2023-12-05 17:57:48 +08:00
parent a40875e78b
commit 727d504f2f
2 changed files with 19 additions and 0 deletions

View File

@ -84,6 +84,8 @@ func RegisterRouter(router *gin.Engine) {
authorized.GET("/transaction/template", service.QueryTransactionTemplates)
authorized.POST("/transaction/template", service.AddTransactionTemplate)
authorized.DELETE("/transaction/template", service.DeleteTransactionTemplate)
authorized.GET("/event/page", service.GetAllEvents)
authorized.POST("/event", service.AddEvent)
authorized.GET("/tags", service.QueryTags)
authorized.GET("/file/dir", service.QueryLedgerSourceFileDir)
authorized.GET("/file/content", service.QueryLedgerSourceFileContent)

17
service/events.go Normal file
View File

@ -0,0 +1,17 @@
package service
import "github.com/gin-gonic/gin"
type Event struct {
Date string `json:"date"`
Type string `json:"type"`
Description string `json:"description"`
}
func GetAllEvents(c *gin.Context) {
OK(c, nil)
}
func AddEvent(c *gin.Context) {
OK(c, nil)
}