2021-03-01 23:46:31 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
|
|
|
|
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE
|
|
|
|
class Api::UsersController < Api::ApiController
|
|
|
|
include Controllers::User::Authorization
|
|
|
|
|
|
|
|
before_action :authenticate_user_with_json!
|
|
|
|
|
2021-08-04 20:10:38 +00:00
|
|
|
# Returns the current user as JSON
|
|
|
|
# If not logged in, causes a 401 error
|
2021-03-01 23:46:31 +00:00
|
|
|
def current
|
2021-08-04 20:10:38 +00:00
|
|
|
@user = current_user
|
2021-03-01 23:46:31 +00:00
|
|
|
end
|
|
|
|
end
|