mirror of https://gitlab.com/litecord/litecord.git
admin_schemas: move FEATURES schema to there
This commit is contained in:
parent
a12c63a7bf
commit
1ad328904d
|
|
@ -17,6 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
"""
|
||||
|
||||
from litecord.enums import Feature
|
||||
|
||||
VOICE_SERVER = {
|
||||
'hostname': {'type': 'string', 'maxlength': 255, 'required': True}
|
||||
}
|
||||
|
|
@ -29,3 +31,12 @@ VOICE_REGION = {
|
|||
'deprecated': {'type': 'boolean', 'default': False},
|
||||
'custom': {'type': 'boolean', 'default': False},
|
||||
}
|
||||
|
||||
FEATURES = {
|
||||
'features': {
|
||||
'type': 'list', 'required': True,
|
||||
|
||||
# using Feature doesn't seem to work with a "not callable" error.
|
||||
'schema': {'coerce': lambda x: Feature(x)}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ from quart import Blueprint, current_app as app, jsonify, request
|
|||
|
||||
from litecord.auth import admin_check
|
||||
from litecord.errors import BadRequest
|
||||
from litecord.schemas import validate, FEATURES
|
||||
from litecord.schemas import validate
|
||||
from litecord.admin_schemas import FEATURES
|
||||
from litecord.blueprints.guilds import vanity_invite
|
||||
|
||||
bp = Blueprint('features_admin', __name__)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ from .permissions import Permissions
|
|||
from .types import Color
|
||||
from .enums import (
|
||||
ActivityType, StatusType, ExplicitFilter, RelationshipType,
|
||||
MessageNotifications, ChannelType, VerificationLevel, Feature
|
||||
MessageNotifications, ChannelType, VerificationLevel
|
||||
)
|
||||
|
||||
from litecord.embed.schemas import EMBED_OBJECT
|
||||
|
|
@ -656,14 +656,6 @@ GET_MENTIONS = {
|
|||
'guild_id': {'coerce': int, 'required': False}
|
||||
}
|
||||
|
||||
FEATURES = {
|
||||
'features': {
|
||||
'type': 'list', 'required': True,
|
||||
|
||||
# using Feature doesn't seem to work with a "not callable" error.
|
||||
'schema': {'coerce': lambda x: Feature(x)}
|
||||
}
|
||||
}
|
||||
|
||||
VANITY_URL_PATCH = {
|
||||
# TODO: put proper values in maybe an invite data type
|
||||
|
|
|
|||
Loading…
Reference in New Issue