Compare commits
No commits in common. "baec55b8a9f74ffe1c7a7a097344a5ef294d6a7a" and "adf6c1e9ddb3147c57d54fd7bbefdc268c9e96c8" have entirely different histories.
baec55b8a9
...
adf6c1e9dd
@ -1,12 +1,5 @@
|
||||
package domain
|
||||
|
||||
type LoginResponse struct {
|
||||
Success bool `json:"success"`
|
||||
Token string `json:"token"`
|
||||
Type string `json:"type"`
|
||||
RefreshToken string `json:"refreshToken"`
|
||||
}
|
||||
|
||||
type ErrorResponse struct {
|
||||
Success bool `json:"success"`
|
||||
Message string `json:"message"`
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"errors"
|
||||
"net/http"
|
||||
|
||||
"git.jamestombleson.com/jtom38/go-cook/api/domain"
|
||||
"git.jamestombleson.com/jtom38/go-cook/api/repositories"
|
||||
"git.jamestombleson.com/jtom38/go-cook/api/domain"
|
||||
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"github.com/labstack/echo/v4"
|
||||
@ -89,12 +89,7 @@ func (h *Handler) AuthLogin(c echo.Context) error {
|
||||
return h.InternalServerErrorResponse(c, err.Error())
|
||||
}
|
||||
|
||||
return c.JSON(http.StatusOK, domain.LoginResponse{
|
||||
Success: true,
|
||||
Token: token,
|
||||
Type: "Bearer",
|
||||
RefreshToken: "",
|
||||
})
|
||||
return c.JSON(http.StatusOK, token)
|
||||
}
|
||||
|
||||
func (h *Handler) validateAdminToken(c echo.Context, password string) error {
|
||||
|
@ -16,7 +16,7 @@ func NewEnvConfig() domain.EnvConfig {
|
||||
log.Println(err)
|
||||
}
|
||||
|
||||
disableMigrations, err := strconv.ParseBool(os.Getenv("DisableMigrationsOnStartup"))
|
||||
disableMigrations, err := strconv.ParseBool(os.Getenv("DisableMigrationsOnStartup"))
|
||||
if err != nil {
|
||||
disableMigrations = false
|
||||
}
|
||||
|
0
portal/.gitkeep
Normal file
0
portal/.gitkeep
Normal file
Loading…
Reference in New Issue
Block a user