mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 11:52:24 -05:00 
			
		
		
		
	[performance] add user cache and database (#879)
* go fmt * add + use user cache and database * fix import * update tests * remove unused relation
This commit is contained in:
		
					parent
					
						
							
								f7af7c061c
							
						
					
				
			
			
				commit
				
					
						56f53a2a6f
					
				
			
		
					 21 changed files with 490 additions and 70 deletions
				
			
		|  | @ -89,8 +89,8 @@ func (p *processor) ConfirmEmail(ctx context.Context, token string) (*gtsmodel.U | |||
| 		return nil, gtserror.NewErrorNotFound(errors.New("no token provided")) | ||||
| 	} | ||||
| 
 | ||||
| 	user := >smodel.User{} | ||||
| 	if err := p.db.GetWhere(ctx, []db.Where{{Key: "confirmation_token", Value: token}}, user); err != nil { | ||||
| 	user, err := p.db.GetUserByConfirmationToken(ctx, token) | ||||
| 	if err != nil { | ||||
| 		if err == db.ErrNoEntries { | ||||
| 			return nil, gtserror.NewErrorNotFound(err) | ||||
| 		} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue