chore(web): directly use new db session
(cherry picked from commit 499f66b7ae4d79e4b69c90caa618f25a18173925)
This commit is contained in:
@ -21,6 +21,8 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"code.vikunja.io/api/pkg/db"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
@ -51,7 +53,7 @@ func (c *WebHandler) DeleteWeb(ctx echo.Context) error {
|
||||
}
|
||||
|
||||
// Create the db session
|
||||
s := config.SessionFactory()
|
||||
s := db.NewSession()
|
||||
defer func() {
|
||||
err = s.Close()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user