fix query
This commit is contained in:
		
							parent
							
								
									d113aae217
								
							
						
					
					
						commit
						4e139d2aae
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -8,12 +8,14 @@ export async function fetchMeta(noCache = false): Promise<Meta> { | ||||||
| 
 | 
 | ||||||
| 	return await db.transaction(async transactionalEntityManager => { | 	return await db.transaction(async transactionalEntityManager => { | ||||||
| 		// 過去のバグでレコードが複数出来てしまっている可能性があるので新しいIDを優先する
 | 		// 過去のバグでレコードが複数出来てしまっている可能性があるので新しいIDを優先する
 | ||||||
| 		const meta = await transactionalEntityManager.findOne(Meta, { | 		const metas = await transactionalEntityManager.find(Meta, { | ||||||
| 			order: { | 			order: { | ||||||
| 				id: 'DESC', | 				id: 'DESC', | ||||||
| 			}, | 			}, | ||||||
| 		}); | 		}); | ||||||
| 
 | 
 | ||||||
|  | 		const meta = metas[0]; | ||||||
|  | 
 | ||||||
| 		if (meta) { | 		if (meta) { | ||||||
| 			cache = meta; | 			cache = meta; | ||||||
| 			return meta; | 			return meta; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue