mirror of
https://github.com/team-alembic/ash_authentication_phoenix.git
synced 2024-09-19 13:03:50 +12:00
docs: helpful step on getting started guide
This commit is contained in:
parent
50c2aef27a
commit
5634d45663
1 changed files with 14 additions and 5 deletions
|
@ -307,15 +307,24 @@ end
|
|||
|
||||
```elixir
|
||||
defmodule Example.Accounts do
|
||||
use Ash.Api
|
||||
use Ash.Api
|
||||
|
||||
resources do
|
||||
resource Example.Accounts.User
|
||||
resource Example.Accounts.Token
|
||||
end
|
||||
resources do
|
||||
resource Example.Accounts.User
|
||||
resource Example.Accounts.Token
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
### Add to config
|
||||
|
||||
Although mentioned in a step at the top, a common mistake here is not to add the new api into your `ash_apis` config in `config/config.exs`. It should look like this:
|
||||
|
||||
```elixir
|
||||
config :example,
|
||||
ash_apis: [..., Example.Accounts]
|
||||
```
|
||||
|
||||
### Create and Migration
|
||||
|
||||
Now is a good time to create the database and run the migrations. You have to use specific `ash_postgres` mix tasks for that:
|
||||
|
|
Loading…
Reference in a new issue