mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 14:01:45 +02:00
chore-refactor_askAI
This commit is contained in:
@@ -263,6 +263,7 @@ class RephraseGrammarEndpoint(BaseAPIView):
|
||||
context = request.data.get("context", "")
|
||||
user_prompt = request.data.get("text_input", "")
|
||||
|
||||
# Check inputs
|
||||
if not context or not user_prompt:
|
||||
return Response(
|
||||
{"error": "Both context and user prompt are required"},
|
||||
@@ -273,6 +274,7 @@ class RephraseGrammarEndpoint(BaseAPIView):
|
||||
else:
|
||||
text_input = request.data.get("text_input", "")
|
||||
|
||||
# Check inputs
|
||||
if not text_input:
|
||||
return Response(
|
||||
{"error": "Text input is required"},
|
||||
|
||||
Reference in New Issue
Block a user