Revert "refactor: 可読性のため一部でArray.prototype.atを使うように" (#115)
				
					
				
			* Revert "refactor: 可読性のため一部で`Array.prototype.at`を使うように (#11274)"
This reverts commit 2b6dbd4fcb.
* Apply suggestions from code review
---------
Co-authored-by: okayurisotto <okayurisotto@proton.me>
			
			
This commit is contained in:
		| @@ -51,7 +51,7 @@ export class CleanRemoteFilesProcessorService { | ||||
| 				break; | ||||
| 			} | ||||
|  | ||||
| 			cursor = files.at(-1)?.id ?? null; | ||||
| 			cursor = files[files.length - 1].id; | ||||
|  | ||||
| 			await Promise.all(files.map(file => this.driveService.deleteFileSync(file, true))); | ||||
|  | ||||
|   | ||||
| @@ -70,7 +70,7 @@ export class DeleteAccountProcessorService { | ||||
| 					break; | ||||
| 				} | ||||
|  | ||||
| 				cursor = notes.at(-1)?.id ?? null; | ||||
| 				cursor = notes[notes.length - 1].id; | ||||
|  | ||||
| 				await this.notesRepository.delete(notes.map(note => note.id)); | ||||
|  | ||||
| @@ -101,7 +101,7 @@ export class DeleteAccountProcessorService { | ||||
| 					break; | ||||
| 				} | ||||
|  | ||||
| 				cursor = files.at(-1)?.id ?? null; | ||||
| 				cursor = files[files.length - 1].id; | ||||
|  | ||||
| 				for (const file of files) { | ||||
| 					await this.driveService.deleteFileSync(file); | ||||
|   | ||||
| @@ -59,7 +59,7 @@ export class DeleteDriveFilesProcessorService { | ||||
| 				break; | ||||
| 			} | ||||
|  | ||||
| 			cursor = files.at(-1)?.id ?? null; | ||||
| 			cursor = files[files.length - 1].id; | ||||
|  | ||||
| 			for (const file of files) { | ||||
| 				await this.driveService.deleteFileSync(file); | ||||
|   | ||||
| @@ -72,7 +72,7 @@ export class ExportBlockingProcessorService { | ||||
| 					break; | ||||
| 				} | ||||
|  | ||||
| 				cursor = blockings.at(-1)?.id ?? null; | ||||
| 				cursor = blockings[blockings.length - 1].id; | ||||
|  | ||||
| 				for (const block of blockings) { | ||||
| 					const u = await this.usersRepository.findOneBy({ id: block.blockeeId }); | ||||
|   | ||||
| @@ -94,7 +94,7 @@ export class ExportFavoritesProcessorService { | ||||
| 					break; | ||||
| 				} | ||||
|  | ||||
| 				cursor = favorites.at(-1)?.id ?? null; | ||||
| 				cursor = favorites[favorites.length - 1].id; | ||||
|  | ||||
| 				for (const favorite of favorites) { | ||||
| 					let poll: Poll | undefined; | ||||
|   | ||||
| @@ -79,7 +79,7 @@ export class ExportFollowingProcessorService { | ||||
| 					break; | ||||
| 				} | ||||
|  | ||||
| 				cursor = followings.at(-1)?.id ?? null; | ||||
| 				cursor = followings[followings.length - 1].id; | ||||
|  | ||||
| 				for (const following of followings) { | ||||
| 					const u = await this.usersRepository.findOneBy({ id: following.followeeId }); | ||||
|   | ||||
| @@ -76,7 +76,7 @@ export class ExportMutingProcessorService { | ||||
| 					break; | ||||
| 				} | ||||
|  | ||||
| 				cursor = mutes.at(-1)?.id ?? null; | ||||
| 				cursor = mutes[mutes.length - 1].id; | ||||
|  | ||||
| 				for (const mute of mutes) { | ||||
| 					const u = await this.usersRepository.findOneBy({ id: mute.muteeId }); | ||||
|   | ||||
| @@ -94,7 +94,7 @@ export class ExportNotesProcessorService { | ||||
| 					break; | ||||
| 				} | ||||
|  | ||||
| 				cursor = notes.at(-1)?.id ?? null; | ||||
| 				cursor = notes[notes.length - 1].id; | ||||
|  | ||||
| 				for (const note of notes) { | ||||
| 					let poll: Poll | undefined; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 まっちゃとーにゅ
					まっちゃとーにゅ