fix: 修复循环提醒创建逻辑,从数据库获取 repeat_type
之前使用 data.repeat_type,但更新请求中没有这个字段。 现在使用 currentEvent.repeat_type 从数据库获取 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8fad17ee08
commit
1e97f0d957
@ -246,9 +246,9 @@ router.put(
|
||||
|
||||
// 检查是否是完成循环提醒
|
||||
let newEventCreated = false;
|
||||
if (data.is_completed === true && data.repeat_type !== 'none') {
|
||||
// 获取当前事件的详细信息用于创建新提醒
|
||||
const currentEvent = existing.rows[0] as EventRow;
|
||||
// 从数据库获取当前事件的 repeat_type
|
||||
const currentEvent = existing.rows[0] as EventRow;
|
||||
if (data.is_completed === true && currentEvent.repeat_type !== 'none') {
|
||||
if (currentEvent) {
|
||||
// 计算下一个提醒日期
|
||||
const currentDate = new Date(currentEvent.date);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user