Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
概要
目標完了時にCloud Tasksの通知が削除されない問題を修正
同時に以下の機能も実装
変更内容
条件文とパスのミス
期限を変更したら、通知を再設定するためにCloud tasksにHTTPリクエストを再設定しようとしたが以下のエラーのように、同じ名前のtaskをすぐに再作成することができないようだったので、goalIdの後ろに作成時間のDate型の数値をつけることで一意にする。また、削除時はgoalIdで始まるtaskを探して削除するようにした。
現状目標と完了投稿の状態が変わった場合の処理は次の通り
目標
createTasksOnGoalCreate
でtask作成deleteTasksOnGoalDelete
でtask削除updateTasksOnPostUpdate
でtask削除・作成完了投稿
updateTasksOnPostUpdate
でtask削除updateTasksOnPostUpdate
でtask作成deleteTasksOnPostCreate
をupdateTasksOnPostUpdate
に変更した確認方法
チェックリスト