Serve /public static files and grant bank_admin table access.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -68,6 +68,7 @@ func start(router *gin.Engine, cfg *config.Config) {
|
||||
ginSwagger.WrapHandler(swaggerFiles.Handler,
|
||||
ginSwagger.DefaultModelsExpandDepth(-1))
|
||||
router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
||||
router.Static("/public", cfg.PublicFilePath)
|
||||
router.GET("/images/:id", auth.GetObject)
|
||||
|
||||
router.Run(`:` + cfg.Listen.Port)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -79,6 +79,7 @@ func (h *handler) login(c *gin.Context) {
|
||||
|
||||
res, err := h.repository.Login(context.TODO(), loginReq)
|
||||
if err != nil {
|
||||
fmt.Println("err in repository.Login", err)
|
||||
c.JSON(http.StatusBadRequest, appresult.ErrInternalServer)
|
||||
return
|
||||
}
|
||||
@@ -94,6 +95,7 @@ func (h *handler) login(c *gin.Context) {
|
||||
|
||||
newTokenPair, err := utils.GenerateTokenPair(res.Id)
|
||||
if err != nil {
|
||||
fmt.Println("err in GenerateTokenPair", err)
|
||||
c.JSON(http.StatusBadRequest, appresult.ErrNotAcceptable)
|
||||
return
|
||||
}
|
||||
|
||||
BIN
backend/myapp
BIN
backend/myapp
Binary file not shown.
Reference in New Issue
Block a user