Skip to content

Commit

Permalink
fix: msg error
Browse files Browse the repository at this point in the history
  • Loading branch information
dongwlin committed Jan 11, 2025
1 parent bdd6dd1 commit 05b523d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions internal/handler/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ import (
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"os"
"path/filepath"
"strconv"
"strings"
"time"

"github.com/MirrorChyan/resource-backend/internal/config"
"github.com/MirrorChyan/resource-backend/internal/db"
"github.com/MirrorChyan/resource-backend/internal/ent"
Expand All @@ -16,13 +24,6 @@ import (
"github.com/gofiber/fiber/v2"
"github.com/segmentio/ksuid"
"go.uber.org/zap"
"io"
"net/http"
"os"
"path/filepath"
"strconv"
"strings"
"time"
)

type VersionHandler struct {
Expand Down Expand Up @@ -443,7 +444,7 @@ func (h *VersionHandler) GetLatest(c *fiber.Ctx) error {
return c.Status(fiber.StatusOK).JSON(resp)
}
if req.CDK == "" {
return c.Status(fiber.StatusOK).JSON(response.Success("current resource latest version is " + latest.Name))
return c.Status(fiber.StatusOK).JSON(response.Success(nil, "current resource latest version is "+latest.Name))
}

if err := h.ValidateCDK(req.CDK, req.SpId); err != nil {
Expand Down

0 comments on commit 05b523d

Please sign in to comment.