summaryrefslogtreecommitdiff
path: root/internal/api/client/notification/notificationsget.go
diff options
context:
space:
mode:
authorLibravatar Daniele Sluijters <daenney@users.noreply.github.com>2022-12-04 14:20:41 +0100
committerLibravatar GitHub <noreply@github.com>2022-12-04 14:20:41 +0100
commit847e7c7c3a1f18eda13004eca64d2606bde54d33 (patch)
tree776bf112f12f010162d240d60f0b1348769bf34a /internal/api/client/notification/notificationsget.go
parent[performance]: make s3 urls cacheable (#1194) (diff)
downloadgotosocial-847e7c7c3a1f18eda13004eca64d2606bde54d33.tar.xz
[chore] Fix a few possible cases of int truncation (#1207)
This fixes a couple of cases where due to int being platform dependent a value could get truncated if running on 32bits.
Diffstat (limited to 'internal/api/client/notification/notificationsget.go')
-rw-r--r--internal/api/client/notification/notificationsget.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/api/client/notification/notificationsget.go b/internal/api/client/notification/notificationsget.go
index 94ea6dbd9..d6b3f5162 100644
--- a/internal/api/client/notification/notificationsget.go
+++ b/internal/api/client/notification/notificationsget.go
@@ -123,7 +123,7 @@ func (m *Module) NotificationsGETHandler(c *gin.Context) {
limit := 20
limitString := c.Query(LimitKey)
if limitString != "" {
- i, err := strconv.ParseInt(limitString, 10, 64)
+ i, err := strconv.ParseInt(limitString, 10, 32)
if err != nil {
err := fmt.Errorf("error parsing %s: %s", LimitKey, err)
api.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGet)