dynamod db index changes added to the schema

This commit is contained in:
Manoj
2022-10-05 15:32:32 +05:30
parent dba8944565
commit cc4eaa2847
16 changed files with 60 additions and 45 deletions

View File

@@ -52,7 +52,7 @@ func (p *provider) GetOTPByEmail(ctx context.Context, emailAddress string) (*mod
collection := p.db.Table(models.Collections.OTP)
err := collection.Scan().Filter("'email' = ?", emailAddress).Limit(1).AllWithContext(ctx, &otps)
err := collection.Scan().Index("email").Filter("'email' = ?", emailAddress).Limit(1).AllWithContext(ctx, &otps)
if err != nil {
return nil, err