houdini/app/controllers/api/users_controller.rb

16 lines
435 B
Ruby
Raw Normal View History

# 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
def current
2021-08-04 20:10:38 +00:00
@user = current_user
end
end