|
@@ -187,6 +187,13 @@ public class ArticleService {
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // If no userId, can't create task (unauthenticated request)
|
|
|
|
|
+ if (userId == null) {
|
|
|
|
|
+ result.put("belowThreshold", true);
|
|
|
|
|
+ result.put("minSeconds", minSeconds);
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 5. Check if a task already exists for this article+child (avoid duplicates)
|
|
// 5. Check if a task already exists for this article+child (avoid duplicates)
|
|
|
Task existingTask = taskMapper.selectOne(
|
|
Task existingTask = taskMapper.selectOne(
|
|
|
new LambdaQueryWrapper<Task>()
|
|
new LambdaQueryWrapper<Task>()
|