diff options
Diffstat (limited to 'internal/web/thread.go')
-rw-r--r-- | internal/web/thread.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/web/thread.go b/internal/web/thread.go index 4a448690d..0450f6b26 100644 --- a/internal/web/thread.go +++ b/internal/web/thread.go @@ -36,14 +36,16 @@ func (m *Module) threadTemplateHandler(c *gin.Context) { ctx := c.Request.Context() - username := c.Param(usernameKey) + // usernames on our instance will always be lowercase + username := strings.ToLower(c.Param(usernameKey)) if username == "" { c.JSON(http.StatusBadRequest, gin.H{"error": "no account username specified"}) return } - statusID := c.Param(statusIDKey) - if username == "" { + // status ids will always be uppercase + statusID := strings.ToUpper(c.Param(statusIDKey)) + if statusID == "" { c.JSON(http.StatusBadRequest, gin.H{"error": "no status id specified"}) return } |