Skip to content

Commit

Permalink
fix(page-by-username): update spec to match function params
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsey committed Oct 17, 2024
1 parent 544f225 commit 74e58c5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/epochtalk_server/models/post.ex
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,12 @@ defmodule EpochtalkServer.Models.Post do
@doc """
Used to page `Post` by a specific `User` given a `username`
"""
@spec page_by_username(username :: String.t(),
priority :: non_neg_integer,
page :: non_neg_integer | nil,
opts :: list() | nil
) :: [map()] | []
@spec page_by_username(
username :: String.t(),
priority :: non_neg_integer,
page :: non_neg_integer | nil,
opts :: list() | nil
) :: [map()] | []
def page_by_username(username, priority, page \\ 1, opts \\ []) when is_binary(username) do
per_page = Keyword.get(opts, :per_page, 25)
offset = page * per_page - per_page
Expand Down

0 comments on commit 74e58c5

Please # to comment.