docs: enable Credo ModuleDoc check and fix remaining modules
Add @moduledoc to Secrets, LiveHelpers, AuthOverrides, and Membership domain. Enable Credo.Check.Readability.ModuleDoc in .credo.exs.
This commit is contained in:
parent
6922086fa1
commit
150bba2ef8
6 changed files with 69 additions and 7 deletions
|
|
@ -1,4 +1,16 @@
|
|||
defmodule MvWeb.LiveHelpers do
|
||||
@moduledoc """
|
||||
Shared LiveView lifecycle hooks and helper functions.
|
||||
|
||||
## on_mount Hooks
|
||||
- `:default` - Sets the user's locale from session (defaults to "de")
|
||||
|
||||
## Usage
|
||||
Add to LiveView modules via:
|
||||
```elixir
|
||||
on_mount {MvWeb.LiveHelpers, :default}
|
||||
```
|
||||
"""
|
||||
def on_mount(:default, _params, session, socket) do
|
||||
locale = session["locale"] || "de"
|
||||
Gettext.put_locale(locale)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue