TP-0000 | Code Refactor (#10)
This commit is contained in:
committed by
GitHub Enterprise
parent
26cbaa29aa
commit
4f74943cf9
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user