File tree Expand file tree Collapse file tree
Firebase/functions/src/todo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ export const requestTodoDeletion = onCall({
4747
4848 try {
4949 await taskRef . set ( taskData ) ;
50- const todoRef = admin . firestore ( ) . doc ( `users/${ userId } /todoLists/${ todoId } ` ) ;
5150 await todoRef . set ( {
5251 // deletingAt: 삭제 요청은 되었지만, 5초 유예 후 최종 삭제되기 전 상태를 의미한다.
5352 deletingAt : admin . firestore . FieldValue . serverTimestamp ( )
@@ -78,10 +77,9 @@ export const requestTodoDeletion = onCall({
7877 } ) ;
7978 }
8079
81- const todoRef = admin . firestore ( ) . doc ( `users/${ userId } /todoLists/${ todoId } ` ) ;
82- const todoSnapshotForCleanup = await todoRef . get ( ) ;
80+ const todoSnapshot = await todoRef . get ( ) ;
8381
84- if ( todoSnapshotForCleanup . exists ) {
82+ if ( todoSnapshot . exists ) {
8583 await todoRef . update ( {
8684 deletingAt : admin . firestore . FieldValue . delete ( )
8785 } ) ;
You can’t perform that action at this time.
0 commit comments