This commit is contained in:
j3d1 2024-06-15 19:38:20 +02:00
parent 3260eefc66
commit 4affc9e8b9
2 changed files with 3 additions and 2 deletions

View file

@ -1,4 +1,4 @@
# Generated by Django 4.2.7 on 2024-06-15 15:59 # Generated by Django 4.2.7 on 2024-06-15 17:37
from django.db import migrations, models from django.db import migrations, models
import django.db.models.deletion import django.db.models.deletion
@ -16,6 +16,7 @@ class Migration(migrations.Migration):
fields=[ fields=[
('id', models.AutoField(primary_key=True, serialize=False)), ('id', models.AutoField(primary_key=True, serialize=False)),
('code', models.CharField(max_length=255)), ('code', models.CharField(max_length=255)),
('type', models.CharField(max_length=255)),
('timestamp', models.DateTimeField(auto_now_add=True)), ('timestamp', models.DateTimeField(auto_now_add=True)),
('used_at', models.DateTimeField(null=True)), ('used_at', models.DateTimeField(null=True)),
('issue_thread', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='shipping_codes', to='tickets.issuethread')), ('issue_thread', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='shipping_codes', to='tickets.issuethread')),

View file

@ -497,7 +497,7 @@ const store = createStore({
} }
}, },
async createShippingCode({commit, state}, code) { async createShippingCode({commit, state}, code) {
const {data, success} = await http.post('/2/shipping_codes/', {code}, state.user.token); const {data, success} = await http.post('/2/shipping_codes/', code, state.user.token);
if (data && success) { if (data && success) {
commit('setShippingCodes', data); commit('setShippingCodes', data);
} }