mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 18:08:11 +00:00 
			
		
		
		
	disallow updating lastUsed from api
This commit is contained in:
		
							parent
							
								
									745a3a8497
								
							
						
					
					
						commit
						c61e402461
					
				| @ -86,6 +86,11 @@ module.exports = { | ||||
|       attributes.description = trim(body.description); | ||||
|     } | ||||
| 
 | ||||
|     // Don't allow updating lastUsed time
 | ||||
|     if (has(attributes, 'lastUsed')) { | ||||
|       throw new ApplicationError('lastUsed cannot be updated'); | ||||
|     } | ||||
| 
 | ||||
|     await validateApiTokenUpdateInput(attributes); | ||||
| 
 | ||||
|     const apiTokenExists = await apiTokenService.getById(id); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ben Irvin
						Ben Irvin