mirror of
https://github.com/dalbodeule/hop-gate.git
synced 2025-12-08 04:45:43 +09:00
[fix](server): update domain status response types for consistency
- Changed `CreatedAt` and `UpdatedAt` fields in `domainStatusResponse` to `time.Time` for type consistency and improved parsing.
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/dalbodeule/hop-gate/internal/logging"
|
"github.com/dalbodeule/hop-gate/internal/logging"
|
||||||
)
|
)
|
||||||
@@ -141,13 +142,13 @@ type domainExistsResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type domainStatusResponse struct {
|
type domainStatusResponse struct {
|
||||||
Success bool `json:"success"`
|
Success bool `json:"success"`
|
||||||
Exists bool `json:"exists"`
|
Exists bool `json:"exists"`
|
||||||
Domain string `json:"domain,omitempty"`
|
Domain string `json:"domain,omitempty"`
|
||||||
Memo string `json:"memo,omitempty"`
|
Memo string `json:"memo,omitempty"`
|
||||||
CreatedAt any `json:"created_at,omitempty"`
|
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||||
UpdatedAt any `json:"updated_at,omitempty"`
|
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||||
Error string `json:"error,omitempty"`
|
Error string `json:"error,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handler) handleDomainUnregister(w http.ResponseWriter, r *http.Request) {
|
func (h *Handler) handleDomainUnregister(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
Reference in New Issue
Block a user