fix: import block syntax in split dashboard files
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled

- Add missing closing ) in clients.go, providers_admin.go, users.go, system.go
- Add SetTimeout(30s) to OpenAI provider (was resty.New() with no timeout)
This commit is contained in:
2026-04-26 14:55:29 -04:00
parent af2c5b95f7
commit db76858072
6 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -2,5 +2,5 @@
"files": {},
"turnCycles": 0,
"maxCycles": 3,
"lastUpdated": "2026-04-26T18:49:43.830Z"
"lastUpdated": "2026-04-26T18:55:13.038Z"
}
+3 -3
View File
@@ -2,14 +2,14 @@ package providers
import (
"context"
"time"
"encoding/json"
"fmt"
"strings"
"time"
"github.com/go-resty/resty/v2"
"gophergate/internal/config"
"gophergate/internal/models"
"github.com/go-resty/resty/v2"
)
type OpenAIProvider struct {
@@ -20,7 +20,7 @@ type OpenAIProvider struct {
func NewOpenAIProvider(cfg config.OpenAIConfig, apiKey string) *OpenAIProvider {
return &OpenAIProvider{
client: resty.New(),
client: resty.New().SetTimeout(30 * time.Second),
config: cfg,
apiKey: apiKey,
}
+1
View File
@@ -17,6 +17,7 @@ import (
"log/slog"
"github.com/shirou/gopsutil/v3/cpu"
)
func (s *Server) handleGetClients(c *gin.Context) {
var clients []db.Client
+1
View File
@@ -17,6 +17,7 @@ import (
"log/slog"
"github.com/shirou/gopsutil/v3/cpu"
)
func (s *Server) handleGetProviders(c *gin.Context) {
var dbConfigs []db.ProviderConfig
+1
View File
@@ -17,6 +17,7 @@ import (
"log/slog"
"github.com/shirou/gopsutil/v3/cpu"
)
func (s *Server) handleSystemHealth(c *gin.Context) {
c.JSON(http.StatusOK, SuccessResponse(gin.H{
+1
View File
@@ -17,6 +17,7 @@ import (
"log/slog"
"github.com/shirou/gopsutil/v3/cpu"
)
func (s *Server) handleGetUsers(c *gin.Context) {
var users []db.User