Users & Auth
This commit is contained in:
4
app/views/v1/authentication/authenticate.json.jbuilder
Normal file
4
app/views/v1/authentication/authenticate.json.jbuilder
Normal file
@ -0,0 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
json.auth_token @token
|
||||
json.user @user, partial: "v1/users/user", as: :user
|
9
app/views/v1/users/_user.json.jbuilder
Normal file
9
app/views/v1/users/_user.json.jbuilder
Normal file
@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
json.extract! user,
|
||||
:id,
|
||||
:display_name,
|
||||
:email,
|
||||
:role
|
||||
|
||||
json.url v1_user_url(user, format: :json)
|
3
app/views/v1/users/index.json.jbuilder
Normal file
3
app/views/v1/users/index.json.jbuilder
Normal file
@ -0,0 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
json.array! @users, partial: 'v1/users/user', as: :user
|
3
app/views/v1/users/show.json.jbuilder
Normal file
3
app/views/v1/users/show.json.jbuilder
Normal file
@ -0,0 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
json.partial! "v1/users/user", user: @user
|
Reference in New Issue
Block a user