You've already forked reloading-manager
fix tpyo
This commit is contained in:
@@ -22,7 +22,9 @@ type postRequest struct {
|
||||
|
||||
func Get(c echo.Context) error {
|
||||
db := c.(*database.CustomContext).Db
|
||||
defer db.Db.Close(context.Background())
|
||||
defer func() {
|
||||
_ = db.Db.Close(context.Background())
|
||||
}()
|
||||
|
||||
cartridges, err := db.Loads.GetCartridges(context.Background())
|
||||
if err != nil {
|
||||
@@ -45,7 +47,9 @@ func Get(c echo.Context) error {
|
||||
|
||||
func Post(c echo.Context) error {
|
||||
db := c.(*database.CustomContext).Db
|
||||
defer db.Db.Close(context.Background())
|
||||
defer func() {
|
||||
_ = db.Db.Close(context.Background())
|
||||
}()
|
||||
|
||||
req := postRequest{}
|
||||
|
||||
@@ -79,7 +83,9 @@ func Post(c echo.Context) error {
|
||||
|
||||
func Delete(c echo.Context) error {
|
||||
db := c.(*database.CustomContext).Db
|
||||
defer db.Db.Close(context.Background())
|
||||
defer func() {
|
||||
_ = db.Db.Close(context.Background())
|
||||
}()
|
||||
|
||||
uid := handlers.ParseUuidOrBadRequest(c, c.Param("id"))
|
||||
if uid == nil {
|
||||
|
||||
Reference in New Issue
Block a user