1
0

chore(web): directly use new db session

(cherry picked from commit 499f66b7ae4d79e4b69c90caa618f25a18173925)
This commit is contained in:
kolaente
2024-08-29 16:31:46 +02:00
parent 459c8daed6
commit d885b43328
7 changed files with 15 additions and 13 deletions

View File

@ -22,6 +22,8 @@ import (
"net/http"
"strconv"
"code.vikunja.io/api/pkg/db"
"github.com/labstack/echo/v4"
)
@ -47,7 +49,7 @@ func (c *WebHandler) ReadOneWeb(ctx echo.Context) error {
}
// Create the db session
s := config.SessionFactory()
s := db.NewSession()
defer func() {
err = s.Close()
if err != nil {