Skip to content

Commit

Permalink
fix(api): gosec linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
bouassaba committed Sep 12, 2024
1 parent b5e9d71 commit 4d6881f
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions api/router/file_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ func (r *FileRouter) List(c *fiber.Ctx) error {
return errorpkg.NewInvalidQueryParamError("query")
}
opts := service.FileListOptions{
Page: uint(page),
Size: uint(size),
Page: uint(page), // #nosec G103
Size: uint(size), // #nosec G103
SortBy: sortBy,
SortOrder: sortOrder,
}
Expand Down
4 changes: 2 additions & 2 deletions api/router/group_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ func (r *GroupRouter) List(c *fiber.Ctx) error {
res, err := r.groupSvc.List(service.GroupListOptions{
Query: query,
OrganizationID: c.Query("organization_id"),
Page: uint(page),
Size: uint(size),
Page: uint(page), // #nosec G103
Size: uint(size), // #nosec G103
SortBy: sortBy,
SortOrder: sortOrder,
}, GetUserID(c))
Expand Down
4 changes: 2 additions & 2 deletions api/router/insights_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ func (r *InsightsRouter) ListEntities(c *fiber.Ctx) error {
}
res, err := r.insightsSvc.ListEntities(c.Params("id"), service.InsightsListEntitiesOptions{
Query: query,
Page: uint(page),
Size: uint(size),
Page: uint(page), // #nosec G103
Size: uint(size), // #nosec G103
SortBy: sortBy,
SortOrder: sortOrder,
}, GetUserID(c))
Expand Down
8 changes: 4 additions & 4 deletions api/router/invitation_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ func (r *InvitationRouter) GetIncoming(c *fiber.Ctx) error {
return errorpkg.NewInvalidQueryParamError("sort_order")
}
res, err := r.invitationSvc.GetIncoming(service.InvitationListOptions{
Page: uint(page),
Size: uint(size),
Page: uint(page), // #nosec G103
Size: uint(size), // #nosec G103
SortBy: sortBy,
SortOrder: sortOrder,
}, GetUserID(c))
Expand Down Expand Up @@ -199,8 +199,8 @@ func (r *InvitationRouter) GetOutgoing(c *fiber.Ctx) error {
return errorpkg.NewInvalidQueryParamError("sort_order")
}
res, err := r.invitationSvc.GetOutgoing(orgID, service.InvitationListOptions{
Page: uint(page),
Size: uint(size),
Page: uint(page), // #nosec G103
Size: uint(size), // #nosec G103
SortBy: sortBy,
SortOrder: sortOrder,
}, GetUserID(c))
Expand Down
4 changes: 2 additions & 2 deletions api/router/organization_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ func (r *OrganizationRouter) List(c *fiber.Ctx) error {
}
res, err := r.orgSvc.List(service.OrganizationListOptions{
Query: query,
Page: uint(page),
Size: uint(size),
Page: uint(page), // #nosec G103
Size: uint(size), // #nosec G103
SortBy: sortBy,
SortOrder: sortOrder,
}, GetUserID(c))
Expand Down
4 changes: 2 additions & 2 deletions api/router/snapshot_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ func (r *SnapshotRouter) List(c *fiber.Ctx) error {
return errorpkg.NewInvalidQueryParamError("sort_order")
}
res, err := r.snapshotSvc.List(fileID, service.SnapshotListOptions{
Page: uint(page),
Size: uint(size),
Page: uint(page), // #nosec G103
Size: uint(size), // #nosec G103
SortBy: sortBy,
SortOrder: sortOrder,
}, GetUserID(c))
Expand Down
4 changes: 2 additions & 2 deletions api/router/task_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ func (r *TaskRouter) List(c *fiber.Ctx) error {
}
res, err := r.taskSvc.List(service.TaskListOptions{
Query: query,
Page: uint(page),
Size: uint(size),
Page: uint(page), // #nosec G103
Size: uint(size), // #nosec G103
SortBy: sortBy,
SortOrder: sortOrder,
}, GetUserID(c))
Expand Down
4 changes: 2 additions & 2 deletions api/router/user_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ func (r *UserRouter) List(c *fiber.Ctx) error {
ExcludeGroupMembers: excludeGroupMembers,
SortBy: sortBy,
SortOrder: sortOrder,
Page: uint(page),
Size: uint(size),
Page: uint(page), // #nosec G103
Size: uint(size), // #nosec G103
}, userID)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions api/router/workspace_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ func (r *WorkspaceRouter) List(c *fiber.Ctx) error {
}
res, err := r.workspaceSvc.List(service.WorkspaceListOptions{
Query: query,
Page: uint(page),
Size: uint(size),
Page: uint(page), // #nosec G103
Size: uint(size), // #nosec G103
SortBy: sortBy,
SortOrder: sortOrder,
}, GetUserID(c))
Expand Down

0 comments on commit 4d6881f

Please sign in to comment.