From 727d504f2f0a765e5e2d2af0d20b3b3d90aba0ba Mon Sep 17 00:00:00 2001 From: BaoXuebin Date: Tue, 5 Dec 2023 17:57:48 +0800 Subject: [PATCH] define event api --- server.go | 2 ++ service/events.go | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 service/events.go diff --git a/server.go b/server.go index 9b36acc..7541c69 100644 --- a/server.go +++ b/server.go @@ -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) diff --git a/service/events.go b/service/events.go new file mode 100644 index 0000000..21af35a --- /dev/null +++ b/service/events.go @@ -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) +}