Skip to content

Commit

Permalink
docs: update /api/user/current -> /api/auth... (#1112)
Browse files Browse the repository at this point in the history
The starter app generated by loco cli does not have /api/user, only
/api/auth so the docs should use this for a streamlined onboarding.

Co-authored-by: Elad Kaplan <[email protected]>
  • Loading branch information
jtwaleson and kaplanelad authored Dec 29, 2024
1 parent 056d383 commit 63b1f1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs-site/content/docs/extras/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $ cargo loco routes
[POST] /api/auth/register
[POST] /api/auth/reset
[POST] /api/auth/verify
[GET] /api/user/current
[GET] /api/auth/current
.
.
.
Expand Down Expand Up @@ -144,7 +144,7 @@ curl --location '127.0.0.1:5150/api/auth/reset' \
This endpoint is protected by auth middleware.

```sh
curl --location --request GET '127.0.0.1:5150/api/user/current' \
curl --location --request GET '127.0.0.1:5150/api/auth/current' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer TOKEN'
```
Expand Down Expand Up @@ -196,7 +196,7 @@ $ cargo loco routes
[POST] /api/auth/register
[POST] /api/auth/reset
[POST] /api/auth/verify
[GET] /api/user/current
[GET] /api/auth/current
.
.
.
Expand Down
2 changes: 1 addition & 1 deletion docs-site/translations/tour-fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Dans votre application côté client, vous enregistrez ce jeton JWT et effectuez
Ce point de terminaison est protégé par un middleware d'authentification. Nous utiliserons le jeton que nous avons obtenu précédemment pour effectuer une requête avec la technique _bearer token_ (remplacez `TOKEN` par le jeton JWT que vous avez obtenu précédemment):

```sh
$ curl --location --request GET '127.0.0.1:5150/api/user/current' \
$ curl --location --request GET '127.0.0.1:5150/api/auth/current' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer TOKEN'
```
Expand Down

0 comments on commit 63b1f1c

Please sign in to comment.