refactor(backend): 存在確認のfindOneByをexistに置き換え (#11224)
				
					
				
			* refactor(backend): 存在確認の`findOneBy`を`exist`に置き換え * cleanup
This commit is contained in:
		| @@ -66,12 +66,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
| 			} | ||||
|  | ||||
| 			// if already liked | ||||
| 			const exist = await this.flashLikesRepository.findOneBy({ | ||||
| 				flashId: flash.id, | ||||
| 				userId: me.id, | ||||
| 			const exist = await this.flashLikesRepository.exist({ | ||||
| 				where: { | ||||
| 					flashId: flash.id, | ||||
| 					userId: me.id, | ||||
| 				}, | ||||
| 			}); | ||||
|  | ||||
| 			if (exist != null) { | ||||
| 			if (exist) { | ||||
| 				throw new ApiError(meta.errors.alreadyLiked); | ||||
| 			} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 okayurisotto
					okayurisotto