-
Notifications
You must be signed in to change notification settings - Fork 111
fix: Resolve backend compilation errors and structural conflicts #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughResolves backend build and merge issues: restructures Config (adds SMTP, YAML tags, removes inline Redis/SMTP), removes prod YAML, renames Comment→AdminComment, updates Gemini usage, tightens websocket broadcasts to per-recipient snapshots, fixes imports and team capacity/BSON logic. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server as WS Handler
participant RoomStore as TeamRoomStore
participant Recipients as snapshotTeamRecipients
Client->>Server: connect / send event
Server->>RoomStore: resolve room & sender info
RoomStore->>Recipients: snapshotTeamRecipients(room, exclude=sender)
Recipients-->>Server: recipient client list
Server->>Recipients: send broadcast payload (exclude sender)
Recipients-->>Client: recipients receive update
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
backend/config/config.go (2)
45-52: SMTP struct fields missing YAML tags.The
SMTPstruct fields lackyamltags, unlike other configuration structs. This will prevent YAML configuration values from being parsed correctly into this struct.- SMTP struct { - Host string - Port int - Username string // Gmail address - Password string // App Password - SenderEmail string // Same as Username for Gmail - SenderName string - } + SMTP struct { + Host string `yaml:"host"` + Port int `yaml:"port"` + Username string `yaml:"username"` // Gmail address + Password string `yaml:"password"` // App Password + SenderEmail string `yaml:"senderEmail"` // Same as Username for Gmail + SenderName string `yaml:"senderName"` + } `yaml:"smtp"`
40-43: JWT struct missing yaml tag on parent.The
JWTstruct itself is missing theyamltag for the parent struct, which may cause parsing issues.JWT struct { Secret string `yaml:"secret"` Expiry int `yaml:"expiry"` - } + } `yaml:"jwt"`
🧹 Nitpick comments (6)
backend/controllers/auth.go (2)
104-107: Silent error handling may hide persistence failures.The error from
persistUserStatsis silently discarded. If the stats normalization persistence fails, it could lead to repeated unnecessary updates on subsequent requests and mask underlying database issues.Consider at minimum logging the error:
if normalizeUserStats(&existingUser) { if err := persistUserStats(dbCtx, &existingUser); err != nil { + log.Printf("Failed to persist normalized user stats for %s: %v", existingUser.Email, err) } }
274-278: Duplicate silent error handling pattern.Same issue as in
GoogleLogin- the error frompersistUserStatsis silently ignored in theLoginfunction.if normalizeUserStats(&user) { if err := persistUserStats(dbCtx, &user); err != nil { + log.Printf("Failed to persist normalized user stats for %s: %v", user.Email, err) } }backend/config/config.go (1)
5-5: Deprecatedioutil.ReadFileusage.
ioutil.ReadFileis deprecated since Go 1.16. Useos.ReadFileinstead.- "io/ioutil" + "os"And in
LoadConfig:- data, err := ioutil.ReadFile(path) + data, err := os.ReadFile(path)backend/services/gemini.go (1)
27-32: Safety settings disable all content filtering.All harm categories are set to
HarmBlockThresholdBlockNone, which disables safety filtering entirely. While this may be intentional for a debate platform, it should be documented and reviewed for compliance with content policies.backend/websocket/team_websocket.go (2)
880-913: Potential race between room deletion check and room usage.The goroutine checks if the room exists at lines 884-885, but there's a window between releasing
teamRoomsMutexand acquiringroom.Mutexwhere another goroutine could delete the room or modify its state.Consider holding
teamRoomsMutexuntil after acquiringroom.Mutex, or using a different synchronization strategy:go func() { time.Sleep(3 * time.Second) teamRoomsMutex.Lock() room, stillExists := teamRooms[roomKey] - teamRoomsMutex.Unlock() - if !stillExists { + teamRoomsMutex.Unlock() log.Printf("[handleTeamReadyStatus] Room %s no longer exists, aborting phase change", roomKey) return } room.Mutex.Lock() + teamRoomsMutex.Unlock()
1072-1103: Duplicate countdown logic in handleCheckStart.This countdown logic is nearly identical to the one in
handleTeamReadyStatus(lines 880-913). Consider extracting to a shared helper function to reduce duplication and ensure consistent behavior.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
backend/go.sumis excluded by!**/*.sum
📒 Files selected for processing (10)
backend/config/config.go(2 hunks)backend/config/config.prod.yml(0 hunks)backend/controllers/auth.go(5 hunks)backend/controllers/team_controller.go(0 hunks)backend/db/db.go(2 hunks)backend/go.mod(3 hunks)backend/models/admin.go(2 hunks)backend/services/gemini.go(1 hunks)backend/websocket/team_websocket.go(2 hunks)backend/websocket/websocket.go(0 hunks)
💤 Files with no reviewable changes (3)
- backend/config/config.prod.yml
- backend/websocket/websocket.go
- backend/controllers/team_controller.go
🔇 Additional comments (14)
backend/controllers/auth.go (2)
6-6: Log import added and used for JWT debugging - LGTM.The
logimport is correctly added and used for debugging JWT generation. The logging provides useful diagnostic information for token generation.Also applies to: 545-561
582-586: Default config path references potentially deleted file.The default config path points to
./config/config.prod.yml, but if this file was deleted in this PR, it could cause runtime failures when theCONFIG_PATHenvironment variable is not set. Verify that the configuration file still exists in the repository or provide an alternative fallback mechanism.backend/db/db.go (2)
7-7: Missing log import added - fixes compilation error.The
logimport was correctly added to resolve the compilation error whenlog.Printlnis called at line 116.
99-118: ConnectRedis implementation looks correct.The Redis connection function properly initializes the client, tests connectivity with a ping, and logs success. Error handling is appropriate.
backend/go.mod (2)
8-9: Dependency additions look appropriate.The casbin dependencies for RBAC, Redis client, and genai version bump align with the project's requirements.
Also applies to: 15-15, 19-19
3-5: Go 1.24 is a released stable version.Go 1.24 was released on February 11, 2025, and go1.24.4 is a valid patch version. No build failures will occur due to version unavailability. However, Go 1.25 is now the latest stable version (as of December 2025), so consider upgrading to a more recent version if compatibility allows.
Likely an incorrect or invalid review comment.
backend/websocket/team_websocket.go (5)
62-73: SafeWrite methods with mutex protection - good pattern.The
SafeWriteJSONandSafeWriteMessagemethods properly use a mutex to prevent concurrent writes to the WebSocket connection, which is required by the gorilla/websocket library.
439-450: Recipient snapshot helper properly handles concurrent access.
snapshotTeamRecipientscorrectly acquires the mutex and creates a copy of clients before releasing the lock, allowing safe iteration outside the critical section.
836-842: Mutex unlock placement after goroutine spawn is correct but fragile.The mutex is unlocked at line 918, which is after the goroutine is spawned at line 880. This is correct because the goroutine doesn't execute immediately and re-acquires locks as needed. However, the code path is complex - consider restructuring for clarity.
Note: The goroutine correctly re-acquires
teamRoomsMutexandroom.Mutexbefore accessing shared state, which is proper.Also applies to: 918-918
948-949: Minor formatting cleanup - LGTM.The added blank line improves readability between variable assignment and the loop.
1-1179: Merge conflict markers successfully removed.The PR objective of removing git merge conflict markers from this file has been achieved. No
<<<<<<< HEAD,=======, or>>>>>>> mainmarkers remain in the code.backend/services/gemini.go (2)
13-19:initGeminireturn value not used to initializegeminiClient.The
initGeminifunction returns a*genai.Client, but there's no visible code assigning it to thegeminiClientvariable that's checked on line 22. This could leavegeminiClientas nil.
26-39: API usage is compatible with google.golang.org/genai v1.37.0.The
GenerateContentmethod signature,SafetySettingsconfiguration, andresp.Text()method are all valid and correct for this package version. No changes needed.backend/models/admin.go (1)
20-35: Unable to verify - repository access failed.The review comment requests verification of the Comment-to-AdminComment rename using shell commands, but no verification results are provided in the original review. Additionally, the codebase cannot be accessed to independently confirm that:
- The old Comment type references have been fully updated across backend code
- models/comment.go exists and contains a Comment struct that would cause the collision
- The rename is complete and no broken references remain
The code snippet itself appears correctly documented, but the claimed namespace collision fix requires verification across the entire codebase to confirm completeness.
|
@rixitgithub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
backend/config/config.go (3)
45-52: SMTP configuration structure looks correct, but consider secrets management.The SMTP struct is properly defined with appropriate fields and YAML tags. However, storing SMTP passwords in plain text YAML configuration files poses a security risk.
Consider using environment variable overrides or a secrets management solution for sensitive credentials like
Password.
54-56: Consider adding YAML tag for consistency.The
GoogleOAuthstruct is missing a YAML tag, unlike all other configuration structs. Consider addingyaml:"googleOAuth"(or your preferred tag name) to maintain consistency and ensure proper YAML unmarshaling if this configuration is used.
61-61: Preferos.ReadFileover deprecatedioutil.ReadFile.The
ioutil.ReadFilefunction has been deprecated since Go 1.16. Consider usingos.ReadFileinstead.Apply this diff to modernize the code:
import ( "fmt" - "io/ioutil" + "os" "gopkg.in/yaml.v3" )- data, err := ioutil.ReadFile(path) + data, err := os.ReadFile(path)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
backend/config/config.go(1 hunks)
🔇 Additional comments (1)
backend/config/config.go (1)
43-43: LGTM! YAML tag added for consistency.The addition of the
yaml:"jwt"tag is correct and ensures consistent YAML unmarshaling with all other configuration structs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
backend/config/config.go(2 hunks)
🔇 Additional comments (2)
backend/config/config.go (2)
5-5: LGTM: Modernized file reading API.The change from
ioutil.ReadFiletoos.ReadFileis correct.ioutil.ReadFilewas deprecated in Go 1.16, andos.ReadFileis the recommended replacement.Also applies to: 62-62
43-43: LGTM: Added missing YAML tag.The
yaml:"jwt"tag makes the JWT struct consistent with other configuration blocks.
| SMTP struct { | ||
| Host string `yaml:"host"` | ||
| Port int `yaml:"port"` | ||
| Username string `yaml:"username"` // Gmail address | ||
| Password string `yaml:"password"` // App Password | ||
| SenderEmail string `yaml:"senderEmail"` // Same as Username for Gmail | ||
| SenderName string `yaml:"senderName"` | ||
| } `yaml:"smtp"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential scope creep and security concern.
The SMTP configuration block appears to add new functionality rather than fix the compilation errors described in PR #128. Consider whether this belongs in a separate feature PR.
Additionally, storing the SMTP password in plain text in the YAML file poses a security risk. Consider using environment variables or a secrets manager for sensitive credentials.
Example using environment variables:
SMTP struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Username string `yaml:"username"`
Password string // Load from environment variable instead
SenderEmail string `yaml:"senderEmail"`
SenderName string `yaml:"senderName"`
} `yaml:"smtp"`Then in your initialization code, load the password from an environment variable:
cfg.SMTP.Password = os.Getenv("SMTP_PASSWORD")🤖 Prompt for AI Agents
In backend/config/config.go around lines 45–52, the new SMTP struct addition
introduces potential scope creep for PR #128 and stores the SMTP password in
plain text via YAML; remove or revert this SMTP block from this PR (move it to a
dedicated feature/security PR) and, if keeping it, remove the yaml tag from the
Password field and load the password from an environment variable or secrets
manager during config initialization (do not persist secrets in the YAML file).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
backend/config/config.go (1)
45-52: Scope creep and security concern remain unaddressed.The SMTP configuration block continues to:
- Add new functionality unrelated to the compilation errors described in PR #128
- Store the SMTP password in plain text via YAML, which poses a security risk
This block should be moved to a separate feature PR. For the password field, remove the
yaml:"password"tag and load the password from an environment variable during initialization instead.
🧹 Nitpick comments (2)
backend/controllers/admin_controller.go (1)
363-375: Field mapping from team message structs toAdminCommentlooks correctThe mappings from
TeamDebateMessageandTeamChatMessageintomodels.AdminComment(ID, content/message, user, team/debate IDs, timestamp → CreatedAt, IsDeleted=false) are coherent and match theAdminCommentdefinition. DebateID being set only for debate messages is also consistent.If this mapping logic grows further, consider extracting small helper functions (e.g.,
NewAdminCommentFromTeamDebateMessage/NewAdminCommentFromTeamChatMessage) to centralize the field wiring and reduce duplication.Also applies to: 388-399
backend/controllers/transcript_controller.go (1)
408-415: Revert to the underscore pattern for unused return values.The email is captured but never used in this function. The
_ = emailline is a workaround to silence the compiler warning, but the idiomatic Go approach is to use_directly in the assignment to signal that the value is intentionally discarded.Apply this diff to clarify intent:
- // FIX: Assign email to variable - valid, email, err := utils.ValidateTokenAndFetchEmail("./config/config.prod.yml", token, c) + valid, _, err := utils.ValidateTokenAndFetchEmail("./config/config.prod.yml", token, c) if err != nil || !valid { c.JSON(401, gin.H{"error": "Invalid or expired token"}) return } - _ = email // Keep compiler happy if email is indeed not used below - err = services.UpdatePendingTranscripts()
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
backend/config/config.go(2 hunks)backend/controllers/admin_controller.go(4 hunks)backend/controllers/transcript_controller.go(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
backend/controllers/transcript_controller.go (1)
backend/utils/auth.go (1)
ValidateTokenAndFetchEmail(133-146)
backend/controllers/admin_controller.go (1)
backend/models/admin.go (1)
AdminComment(22-35)
🔇 Additional comments (6)
backend/config/config.go (3)
5-5: LGTM: Correct modernization from deprecatedioutil.The change from
ioutil.ReadFiletoos.ReadFilefollows Go best practices sinceioutil.ReadFilehas been deprecated since Go 1.16.Also applies to: 61-62
40-43: LGTM: YAML tag added for consistency.The
yaml:"jwt"tag ensures proper YAML unmarshaling and aligns with the tagging pattern used by other configuration blocks.
54-56: LGTM: Missing YAML tag now added.The
yaml:"googleOAuth"tag has been properly added, addressing the previous review feedback. This ensures consistent YAML unmarshaling across all configuration blocks.backend/controllers/admin_controller.go (2)
352-353: Type change to[]models.AdminCommentcorrectly matches renamed modelUsing
[]models.AdminCommenthere is consistent with the model rename and should resolve the name collision without changing the JSON shape, since the struct fields and tags remain the same.
515-515: No behavioral changeThis line appears to be an end-of-file formatting/newline adjustment only; no functional impact.
backend/controllers/transcript_controller.go (1)
399-424: Add authorization check for sensitive operation.This handler updates ALL pending transcripts without filtering by user or checking for admin privileges. Any authenticated user can currently trigger this operation. If this endpoint should be restricted, add an authorization check before calling
services.UpdatePendingTranscripts()to verify admin role.Consider checking whether your codebase has existing authorization patterns (admin middleware, role-checking utilities) and apply them consistently with other endpoints that perform privileged operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
backend/websocket/debate_spectator.go (1)
101-125: Connection lifecycle leak:DebateWebsocketHandlernever returns due toselect {}, soUnregisteris never called
DebateWebsocketHandlerdefershub.Unregister(debateID, conn)andconn.Close(), then startsreadPumpin a new goroutine and blocks forever onselect {}. Sinceselect {}never returns, the deferred functions never execute.Effects:
- Disconnected clients remain in
room.clients, inflating presence counts- Handler goroutines leak (one per connection, forever)
- Broadcast loops write to closed connections repeatedly
Fix: Run
readPumpon the handler goroutine instead of spawning it, so the handler blocks until the client disconnects and defers execute:- // Read pump - go readPump(client, hub) - - // Keep connection alive - select {} + // Read pump; block until client disconnects so defers run + readPump(client, hub)When
readPumpexits on read error or close,DebateWebsocketHandlerreturns andUnregisterruns.Also applies to: 227-264
🧹 Nitpick comments (1)
backend/websocket/debate_spectator.go (1)
18-22: PermissiveCheckOrigindisables CSRF protection for WebSocket connections
debateUpgradercurrently allows any origin:CheckOrigin: func(r *http.Request) bool { return true },This is convenient during development but effectively disables origin checks, allowing arbitrary websites to establish WS connections to your backend if they can reach it over the network.
Consider tightening this to validate against a configured list of allowed origins or at least environment‑dependent behavior (e.g., strict in prod, permissive in local dev).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
backend/cmd/server/main.go(3 hunks)backend/config/config.prod.sample.yml(1 hunks)backend/websocket/debate_spectator.go(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- backend/config/config.prod.sample.yml
🧰 Additional context used
🧬 Code graph analysis (1)
backend/cmd/server/main.go (1)
backend/websocket/debate_spectator.go (1)
DebateWebsocketHandler(196-264)
🔇 Additional comments (4)
backend/cmd/server/main.go (1)
166-167: LGTM! Correct namespacing for the debate WebSocket handler.The handler is now properly referenced from the
websocketpackage, resolving the previous compilation error.backend/websocket/debate_spectator.go (3)
1-1: Package rename correctly aligns this file with the websocket packageSwitching from
package maintopackage websockethere is consistent with the other websocket files and avoids mixed-package compilation issues in the same directory.
188-193: Avoid concurrent writes on the same WebSocket: useSpectatorClient.WriteJSONinstead ofconn.WriteJSONin the handlerGorilla WebSocket requires all writes to a connection to be serialized. In
DebateWebsocketHandler, direct calls toconn.WriteJSONfor the initial snapshot and presence event can race with concurrent broadcasts that callclient.WriteJSON, which serializes writes viawriteMu. Sinceclient *SpectatorClientis already available, route these writes through its mutex-protected helper to ensure all writes on the connection are properly serialized:- conn.WriteJSON(snapshot) + _ = client.WriteJSON(snapshot)- conn.WriteJSON(presenceEvent) + _ = client.WriteJSON(presenceEvent)
55-99: Verify mutex locking pattern inRegisterandBroadcastPresenceThe review identifies a potential self-deadlock where
Registerholdsh.mu.Lock()and then callsh.BroadcastPresence, which attempts to acquireh.mu.RLock(). This pattern is theoretically problematic because Go'ssync.RWMutexis not re-entrant—a writer lock (Lock) held cannot wait on a reader lock (RLock) without causing deadlock.However, verification requires inspecting the actual
BroadcastPresenceimplementation to confirm it indeed callsh.mu.RLock(), and checking lines 164-186 to confirm the same pattern exists there. The repository is currently unavailable for direct inspection.The proposed fix (releasing
h.mubefore the broadcast call) is sound in principle, but cannot be validated against the actual codebase implementation.
| if cfg.Redis.Addr != "" { | ||
| redisURL := cfg.Redis.Addr | ||
| if redisURL == "" { | ||
| redisURL = "localhost:6379" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dead code: unreachable default assignment.
The inner check if redisURL == "" on line 48 is unreachable because line 46 already ensures cfg.Redis.Addr != "", and line 47 assigns that non-empty value to redisURL. The default "localhost:6379" will never be applied.
Apply this diff to remove the dead code:
if cfg.Redis.Addr != "" {
redisURL := cfg.Redis.Addr
- if redisURL == "" {
- redisURL = "localhost:6379"
- }
if err := debate.InitRedis(redisURL, cfg.Redis.Password, cfg.Redis.DB); err != nil {Alternatively, if a default Redis address is desired, restructure the logic:
- if cfg.Redis.Addr != "" {
- redisURL := cfg.Redis.Addr
- if redisURL == "" {
- redisURL = "localhost:6379"
- }
+ redisURL := cfg.Redis.Addr
+ if redisURL == "" {
+ redisURL = "localhost:6379"
+ }
+ if redisURL != "" {
if err := debate.InitRedis(redisURL, cfg.Redis.Password, cfg.Redis.DB); err != nil {
log.Printf("⚠️ Warning: Failed to initialize Redis: %v", err)
log.Printf("⚠️ Some realtime features will be unavailable until Redis is reachable")
} else {
log.Println("Connected to Redis")
}
} else {
log.Println("Redis Addr not configured; continuing without Redis-backed features")
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if cfg.Redis.Addr != "" { | |
| redisURL := cfg.Redis.Addr | |
| if redisURL == "" { | |
| redisURL = "localhost:6379" | |
| } | |
| if cfg.Redis.Addr != "" { | |
| redisURL := cfg.Redis.Addr | |
| if err := debate.InitRedis(redisURL, cfg.Redis.Password, cfg.Redis.DB); err != nil { |
🤖 Prompt for AI Agents
In backend/cmd/server/main.go around lines 46-50, the inner check `if redisURL
== ""` is unreachable because you already gated with `if cfg.Redis.Addr != ""`
and then assigned that value to `redisURL`; remove the redundant inner check and
simply use cfg.Redis.Addr or, if you want a fallback default, restructure by
removing the outer `if` and assign redisURL from cfg.Redis.Addr with a
subsequent check to set `"localhost:6379"` when cfg.Redis.Addr is empty.
|
@bhavik-mangla |
|
@rixitgithub please review my PR |
|
please include testing evidences |
|
Good work fixing fields mismatch @ARCoder181105 🙌 |

Description
This PR resolves critical compilation errors that are currently preventing the backend server from building and starting. It addresses struct naming collisions, duplicate configuration fields, and unresolved merge conflicts found in the codebase.
Note to Maintainers:
This PR focuses strictly on fixing the build. I have identified further runtime errors and areas for refactoring (such as the Gemini service logic and WebSocket handlers), but I am submitting this first to establish a stable, compilable baseline. I plan to address the remaining logic/runtime issues in subsequent PRs once this is merged.
Fixes
Fixes #128
Changes
Redisstruct definition that was causing redeclaration errors.Commentstruct toAdminCommentto resolve a namespace collision with the mainCommentmodel inmodels/comment.go."log"import required for Redis connection logging.<<<< HEAD), removed duplicate function definitions, and consolidated helper functions.Type of Change
Verification
go mod tidyrun successfully.go build ./...passes without errors.Summary by CodeRabbit
Bug Fixes
Improvements
Chores
✏️ Tip: You can customize this high-level summary in your review settings.