TP-0000 | Code Refactor (#10)

This commit is contained in:
Ravi Chandora
2023-04-10 17:30:28 +05:30
committed by GitHub Enterprise
parent 26cbaa29aa
commit 4f74943cf9
117 changed files with 3023 additions and 4023 deletions

View File

@@ -1,8 +1,7 @@
package handler
import (
"houston/model/request"
"houston/pkg/postgres/query"
"houston/api/request"
"net/http"
"github.com/gin-gonic/gin"
@@ -32,11 +31,11 @@ func (th *teamHandler) AddTeam(c *gin.Context) {
}
th.logger.Info("add team request received", zap.String("team_name", addTeamRequest.Name))
err := query.AddTeam(th.db, addTeamRequest)
if err != nil {
c.JSON(http.StatusInternalServerError, err)
return
}
//err := query.AddTeam(th.db, addTeamRequest)
//if err != nil {
// c.JSON(http.StatusInternalServerError, err)
// return
//}
c.JSON(http.StatusOK, nil)
}