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

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