Skip to content

Commit

Permalink
fix: change 'change' to 'reset' for resetting password
Browse files Browse the repository at this point in the history
  • Loading branch information
AmooHashem committed Jan 13, 2025
1 parent 7c67fc6 commit 6802ae1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.1.3 on 2025-01-13 16:16

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('accounts', '0045_alter_purchase_discount_code_and_more'),
]

operations = [
migrations.AlterField(
model_name='verificationcode',
name='verification_type',
field=models.CharField(choices=[('create-user-account', 'Createuseraccount'), ('reset-user-password', 'Resetuserpassword'), ('change-user-phone-number', 'Changeuserphonenumber')], max_length=30, null=True),
),
]
2 changes: 1 addition & 1 deletion apps/accounts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def create_verification_code(self, phone_number, time_zone='Asia/Tehran'):
class VerificationCode(models.Model):
class VerificationType(models.TextChoices):
CreateUserAccount = 'create-user-account'
ChangeUserPassword = 'change-user-password'
ResetUserPassword = 'reset-user-password'
ChangeUserPhoneNumber = 'change-user-phone-number'

# todo: set verification code while sending verification code
Expand Down
2 changes: 1 addition & 1 deletion proxies/sms_system/sms_service_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class SMSService(ABC):

class OtpTypes:
CreateUserAccount = 'create-user-account'
ChangeUserPassword = 'change-user-password'
ResetUserPassword = 'reset-user-password'
ChangeUserPhoneNumber = 'change-user-phone-number'

class RegularSMSTypes:
Expand Down

0 comments on commit 6802ae1

Please sign in to comment.