You've already forked reloading-manager
fix tpyo
This commit is contained in:
@@ -21,7 +21,10 @@ type BulletResponse struct {
|
||||
|
||||
func Photo(c echo.Context) error {
|
||||
db := c.(*database.CustomContext).Db
|
||||
defer db.Db.Close(context.Background())
|
||||
|
||||
defer func() {
|
||||
_ = db.Db.Close(context.Background())
|
||||
}()
|
||||
|
||||
id := c.Param("id")
|
||||
uid := handlers.ParseUuidOrBadRequest(c, id)
|
||||
@@ -48,7 +51,10 @@ func Photo(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())
|
||||
}()
|
||||
|
||||
id := c.Param("id")
|
||||
uid := handlers.ParseUuidOrBadRequest(c, id)
|
||||
@@ -66,7 +72,9 @@ func Delete(c echo.Context) error {
|
||||
|
||||
func Put(c echo.Context) error {
|
||||
db := c.(*database.CustomContext).Db
|
||||
defer db.Db.Close(context.Background())
|
||||
defer func() {
|
||||
_ = db.Db.Close(context.Background())
|
||||
}()
|
||||
|
||||
id := c.Param("id")
|
||||
uid := handlers.ParseUuidOrBadRequest(c, id)
|
||||
@@ -147,7 +155,9 @@ func Put(c echo.Context) error {
|
||||
|
||||
func Get(c echo.Context) error {
|
||||
db := c.(*database.CustomContext).Db
|
||||
defer db.Db.Close(context.Background())
|
||||
defer func() {
|
||||
_ = db.Db.Close(context.Background())
|
||||
}()
|
||||
|
||||
if c.Param("id") != "" {
|
||||
id := c.Param("id")
|
||||
@@ -210,7 +220,6 @@ func Get(c echo.Context) error {
|
||||
}
|
||||
|
||||
func Post(c echo.Context) error {
|
||||
|
||||
file, err := c.FormFile("photo")
|
||||
if err != nil {
|
||||
c.Logger().Error(err)
|
||||
@@ -245,7 +254,9 @@ func Post(c echo.Context) error {
|
||||
}
|
||||
|
||||
db := c.(*database.CustomContext).Db
|
||||
defer db.Db.Close(context.Background())
|
||||
defer func() {
|
||||
_ = db.Db.Close(context.Background())
|
||||
}()
|
||||
|
||||
manufacturerUid := handlers.ParseUuidOrBadRequest(c, manufacturerId)
|
||||
if manufacturerUid == nil {
|
||||
|
||||
Reference in New Issue
Block a user