@@ -47,8 +47,8 @@ defmodule EpochtalkServer.Models.BoardBan do
4747 Returns `true` if the user is banned from the specified `Board` or `false`
4848 otherwise.
4949 """
50- @ spec is_banned_from_board ( user :: User . t ( ) , opts :: list ) :: { :ok , banned :: boolean }
51- def is_banned_from_board ( % { id: user_id } = _user , opts ) when is_integer ( user_id ) do
50+ @ spec banned_from_board? ( user :: User . t ( ) , opts :: list ) :: { :ok , banned :: boolean }
51+ def banned_from_board? ( % { id: user_id } = _user , opts ) when is_integer ( user_id ) do
5252 board_id = Keyword . get ( opts , :board_id )
5353 post_id = Keyword . get ( opts , :post_id )
5454 thread_id = Keyword . get ( opts , :thread_id )
@@ -91,7 +91,7 @@ defmodule EpochtalkServer.Models.BoardBan do
9191 { :ok , result }
9292 end
9393
94- def is_banned_from_board ( nil , _opts ) , do: { :ok , false }
94+ def banned_from_board? ( nil , _opts ) , do: { :ok , false }
9595
9696 @ doc """
9797 Used to check if `User` with specified `user_id` is not banned from board.
@@ -100,13 +100,13 @@ defmodule EpochtalkServer.Models.BoardBan do
100100 Returns `true` if the user is **not** banned from the specified `Board` or `false`
101101 otherwise.
102102 """
103- @ spec is_not_banned_from_board ( user :: User . t ( ) , opts :: list ) :: { :ok , not_banned :: boolean }
104- def is_not_banned_from_board ( user , opts \\ [ ] )
103+ @ spec not_banned_from_board? ( user :: User . t ( ) , opts :: list ) :: { :ok , not_banned :: boolean }
104+ def not_banned_from_board? ( user , opts \\ [ ] )
105105
106- def is_not_banned_from_board ( % { id: user_id } = user , opts ) when is_integer ( user_id ) do
107- { :ok , banned } = is_banned_from_board ( user , opts )
106+ def not_banned_from_board? ( % { id: user_id } = user , opts ) when is_integer ( user_id ) do
107+ { :ok , banned } = banned_from_board? ( user , opts )
108108 { :ok , ! banned }
109109 end
110110
111- def is_not_banned_from_board ( nil , _opts ) , do: { :ok , true }
111+ def not_banned_from_board? ( nil , _opts ) , do: { :ok , true }
112112end
0 commit comments