Move Identities to My::Identities

This commit is contained in:
Stanko K.R.
2025-12-10 15:13:35 +01:00
parent 90e6322092
commit 5ce71bf941
5 changed files with 5 additions and 6 deletions
@@ -1,4 +1,4 @@
class IdentitiesController < ApplicationController
class My::IdentitiesController < ApplicationController
disallow_account_scope
def show
@@ -1,5 +1,5 @@
json.accounts @identity.users do |user|
json.partial! "identities/account", account: user.account
json.partial! "my/identities/account", account: user.account
json.user do
json.partial! "users/user", user: user
end
+1 -2
View File
@@ -163,9 +163,8 @@ Rails.application.routes.draw do
resource :landing
resource :identity, only: :show
namespace :my do
resource :identity, only: :show
resources :access_tokens
resources :pins
resource :timezone
@@ -1,6 +1,6 @@
require "test_helper"
class IdentitiesControllerTest < ActionDispatch::IntegrationTest
class My::IdentitiesControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
end
@@ -9,7 +9,7 @@ class IdentitiesControllerTest < ActionDispatch::IntegrationTest
identity = identities(:kevin)
untenanted do
get identity_path, as: :json
get my_identity_path, as: :json
assert_response :success
assert_equal identity.accounts.count, @response.parsed_body["accounts"].count
end