diff options
author | 2019-04-05 20:59:22 +0100 | |
---|---|---|
committer | 2019-04-05 20:59:22 +0100 | |
commit | d576432e6145df464273f0f22d841cc9f5804b07 (patch) | |
tree | c229454c3b415cdacc950940283c1cdb80007783 /pydis_site | |
parent | pysite -> pydis_site (diff) |
Address review by @jchristgit
Diffstat (limited to 'pydis_site')
-rw-r--r-- | pydis_site/apps/api/migrations/0008_tag_embed_validator.py | 5 | ||||
-rw-r--r-- | pydis_site/apps/api/migrations/0019_deletedmessage.py | 5 | ||||
-rw-r--r-- | pydis_site/apps/api/views.py | 2 | ||||
-rw-r--r-- | pydis_site/apps/api/viewsets.py | 8 |
4 files changed, 7 insertions, 13 deletions
diff --git a/pydis_site/apps/api/migrations/0008_tag_embed_validator.py b/pydis_site/apps/api/migrations/0008_tag_embed_validator.py index eecc0bc3..ea8f03d2 100644 --- a/pydis_site/apps/api/migrations/0008_tag_embed_validator.py +++ b/pydis_site/apps/api/migrations/0008_tag_embed_validator.py @@ -15,9 +15,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='tag', name='embed', - field=django.contrib.postgres.fields.jsonb.JSONField(help_text='The actual embed shown by this tag.', validators=[ - - - pydis_site.apps.api.validators.validate_tag_embed]), + field=django.contrib.postgres.fields.jsonb.JSONField(help_text='The actual embed shown by this tag.', validators=[pydis_site.apps.api.validators.validate_tag_embed]), ), ] diff --git a/pydis_site/apps/api/migrations/0019_deletedmessage.py b/pydis_site/apps/api/migrations/0019_deletedmessage.py index 7a039675..f451ecf4 100644 --- a/pydis_site/apps/api/migrations/0019_deletedmessage.py +++ b/pydis_site/apps/api/migrations/0019_deletedmessage.py @@ -19,10 +19,7 @@ class Migration(migrations.Migration): ('id', models.BigIntegerField(help_text='The message ID as taken from Discord.', primary_key=True, serialize=False, validators=[django.core.validators.MinValueValidator(limit_value=0, message='Message IDs cannot be negative.')])), ('channel_id', models.BigIntegerField(help_text='The channel ID that this message was sent in, taken from Discord.', validators=[django.core.validators.MinValueValidator(limit_value=0, message='Channel IDs cannot be negative.')])), ('content', models.CharField(help_text='The content of this message, taken from Discord.', max_length=2000)), - ('embeds', django.contrib.postgres.fields.ArrayField(base_field=django.contrib.postgres.fields.jsonb.JSONField(validators=[ - - - pydis_site.apps.api.validators.validate_tag_embed]), help_text='Embeds attached to this message.', size=None)), + ('embeds', django.contrib.postgres.fields.ArrayField(base_field=django.contrib.postgres.fields.jsonb.JSONField(validators=[pydis_site.apps.api.validators.validate_tag_embed]), help_text='Embeds attached to this message.', size=None)), ('author', models.ForeignKey(help_text='The author of this message.', on_delete=django.db.models.deletion.CASCADE, to='api.User')), ('deletion_context', models.ForeignKey(help_text='The deletion context this message is part of.', on_delete=django.db.models.deletion.CASCADE, to='api.MessageDeletionContext')), ], diff --git a/pydis_site/apps/api/views.py b/pydis_site/apps/api/views.py index 3160e8f7..f88e1039 100644 --- a/pydis_site/apps/api/views.py +++ b/pydis_site/apps/api/views.py @@ -131,7 +131,7 @@ class RulesView(APIView): ), ( "We will not help you with anything that might break a law or the " - "terms of service of any other community, pydis_site, service, or " + "terms of service of any other community, pysite, service, or " "otherwise - No piracy, brute-forcing, captcha circumvention, " "sneaker bots, or anything else of that nature." ), diff --git a/pydis_site/apps/api/viewsets.py b/pydis_site/apps/api/viewsets.py index 0471f79d..17024fe8 100644 --- a/pydis_site/apps/api/viewsets.py +++ b/pydis_site/apps/api/viewsets.py @@ -54,7 +54,7 @@ class DeletedMessageViewSet(CreateModelMixin, GenericViewSet): #### Body schema >>> { ... # The member ID of the original actor, if applicable. - ... # If a member ID is given, it must be present on the pydis_site. + ... # If a member ID is given, it must be present on the site. ... 'actor': Optional[int] ... 'creation': datetime, ... 'messages': [ @@ -192,7 +192,7 @@ class InfractionViewSet(CreateModelMixin, RetrieveModelMixin, ListModelMixin, Ge ### POST /bot/infractions Create a new infraction and return the created infraction. Only `actor`, `type`, and `user` are required. - The `actor` and `user` must be users known by the pydis_site. + The `actor` and `user` must be users known by the site. #### Request body >>> { @@ -427,7 +427,7 @@ class ReminderViewSet(CreateModelMixin, ListModelMixin, DestroyModelMixin, Gener class RoleViewSet(ModelViewSet): """ View providing CRUD access to the roles on our server, used - by the bot to keep a mirror of our server's roles on the pydis_site. + by the bot to keep a mirror of our server's roles on the site. ## Routes ### GET /bot/roles @@ -802,7 +802,7 @@ class UserViewSet(BulkCreateModelMixin, ModelViewSet): ### POST /bot/users Adds a single or multiple new users. - The roles attached to the user(s) must be roles known by the pydis_site. + The roles attached to the user(s) must be roles known by the site. #### Request body >>> { |