Adjust to the in-house style

- Use jbuilder instead of hashes
- Use resource instead of direct HTTP verbs
    Verbs only make sense if you have one or two routes, if there are
    multiple that emulate what resource does then it's better to use resource.
- Paginate using link headers
- Cache responses
This commit is contained in:
Stanko K.R.
2026-08-11 13:15:34 +02:00
parent 20ab5b1bc6
commit 80c9e7fbfe
11 changed files with 205 additions and 140 deletions
+5
View File
@@ -0,0 +1,5 @@
json.cache! user do
json.(user, :id, :name, :role)
json.avatar_url fresh_user_avatar_url(user)
end