feat: added promocode getting by id, added likes add/delete, code refactoring

This commit is contained in:
ITQ
2025-01-24 22:51:44 +03:00
parent fe2bc038a9
commit afc6a5cf09
5 changed files with 127 additions and 16 deletions
@@ -1,4 +1,4 @@
# Generated by Django 5.1.5 on 2025-01-23 17:54
# Generated by Django 5.1.5 on 2025-01-24 18:26
import apps.promo.validators
import django.core.validators
@@ -86,7 +86,7 @@ class Migration(migrations.Migration):
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='liked_promocodes', to='user.user')),
],
options={
'abstract': False,
'unique_together': {('promocode', 'user')},
},
),
]