fix: ai-assist 404 on CE (#13891)
# Pull Request Template ## Description Relocate controller from enterprise/ to app/ and add Api::V1::Accounts::Captain::TasksController.prepend_mod_with for EE overrides. Fixes: Ai assist giving 404 on CE ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. before: <img width="482" height="130" alt="image" src="https://github.com/user-attachments/assets/f51dc28a-ac54-45c4-9015-6f956fdf5057" /> after: <img width="458" height="182" alt="image" src="https://github.com/user-attachments/assets/eb86a679-5482-4157-9f4e-f3e9953d8649" /> ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged and published in downstream modules Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
This commit is contained in:
@@ -57,7 +57,7 @@ class Api::V1::Accounts::Captain::TasksController < Api::V1::Accounts::BaseContr
|
||||
if result.nil?
|
||||
render json: { message: nil }
|
||||
elsif result[:error]
|
||||
render json: { error: result[:error] }, status: :unprocessable_entity
|
||||
render json: { error: result[:error] }, status: :unprocessable_content
|
||||
else
|
||||
response_data = { message: result[:message] }
|
||||
response_data[:follow_up_context] = result[:follow_up_context] if result[:follow_up_context]
|
||||
@@ -69,3 +69,5 @@ class Api::V1::Accounts::Captain::TasksController < Api::V1::Accounts::BaseContr
|
||||
authorize(:'captain/tasks')
|
||||
end
|
||||
end
|
||||
|
||||
Api::V1::Accounts::Captain::TasksController.prepend_mod_with('Api::V1::Accounts::Captain::TasksController')
|
||||
Reference in New Issue
Block a user