diff --git a/pkg/sqlite/db.go b/pkg/sqlite/db.go index 253beb9..331d64e 100644 --- a/pkg/sqlite/db.go +++ b/pkg/sqlite/db.go @@ -36,7 +36,7 @@ func GetDb(dbPath string) *gorm.DB { c, _ := db.DB() c.SetMaxIdleConns(10) - c.SetMaxOpenConns(100) + c.SetMaxOpenConns(1) c.SetConnMaxIdleTime(time.Second * 1000) gdb = db diff --git a/route/v2/api_route_event.go b/route/v2/api_route_event.go index 78db94f..180df2e 100644 --- a/route/v2/api_route_event.go +++ b/route/v2/api_route_event.go @@ -18,6 +18,7 @@ func (s *UserService) GetEvents(ctx echo.Context, params codegen.GetEventsParams list := service.MyService.Event().GetEvents() return ctx.JSON(http.StatusOK, list) } + func (s *UserService) DeleteEventBySerial(ctx echo.Context, serial codegen.Serial) error { service.MyService.Event().DeleteEventBySerial(serial) return ctx.JSON(http.StatusOK, serial)