diff --git a/internal/handlers/account/messages/list.go b/internal/handlers/account/messages/list.go index 998838e..9604d8b 100644 --- a/internal/handlers/account/messages/list.go +++ b/internal/handlers/account/messages/list.go @@ -10,7 +10,6 @@ import ( ) func mustUserID(c *gin.Context) int64 { - // Pull from your auth middleware/session. Panic-unsafe alternative: if v, ok := c.Get("userID"); ok { if id, ok2 := v.(int64); ok2 { return id @@ -20,25 +19,6 @@ func mustUserID(c *gin.Context) int64 { return 1 } -func parseIDParam(c *gin.Context, name string) (int64, error) { - // typical atoi wrapper - // (implement: strconv.ParseInt(c.Param(name), 10, 64)) - return atoi64(c.Param(name)) -} - -func atoi64(s string) (int64, error) { - // small helper to keep imports focused - // replace with strconv.ParseInt in real code - var n int64 - for _, ch := range []byte(s) { - if ch < '0' || ch > '9' { - return 0, &strconvNumErr{} - } - n = n*10 + int64(ch-'0') - } - return n, nil -} - type strconvNumErr struct{} func (e *strconvNumErr) Error() string { return "invalid number" }