You've already forked reloading-manager
fix tpyo
This commit is contained in:
@@ -19,7 +19,9 @@ type PrimerResponse struct {
|
||||
|
||||
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, err := handlers.ParseUuid(id)
|
||||
@@ -37,7 +39,9 @@ func Delete(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())
|
||||
}()
|
||||
|
||||
if c.Param("id") != "" {
|
||||
id := c.Param("id")
|
||||
@@ -112,7 +116,8 @@ func Post(c echo.Context) error {
|
||||
if metaString == "" {
|
||||
metaString = "{}"
|
||||
}
|
||||
var meta json.RawMessage = []byte(metaString)
|
||||
|
||||
meta := []byte(metaString)
|
||||
|
||||
newUuid := uuid.New().String()
|
||||
uid, _ := handlers.ParseUuid(newUuid)
|
||||
@@ -145,7 +150,9 @@ func Post(c echo.Context) error {
|
||||
|
||||
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)
|
||||
@@ -172,7 +179,9 @@ func Photo(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")
|
||||
|
||||
Reference in New Issue
Block a user