mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Enable enum errors
This commit is contained in:
parent
279ad61a1b
commit
2520e4b00f
@ -205,14 +205,14 @@ class ApiCraftyConfigIndexHandler(BaseApiHandler):
|
|||||||
try:
|
try:
|
||||||
validate(data, config_json_schema)
|
validate(data, config_json_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
|
@ -63,14 +63,14 @@ class ApiImportFilesIndexHandler(BaseApiHandler):
|
|||||||
try:
|
try:
|
||||||
validate(data, files_get_schema)
|
validate(data, files_get_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
|
@ -145,14 +145,14 @@ class ApiRolesIndexHandler(BaseApiHandler):
|
|||||||
else:
|
else:
|
||||||
validate(data, basic_create_role_schema)
|
validate(data, basic_create_role_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
|
@ -176,14 +176,14 @@ class ApiRolesRoleIndexHandler(BaseApiHandler):
|
|||||||
else:
|
else:
|
||||||
validate(data, basic_modify_role_schema)
|
validate(data, basic_modify_role_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
|
@ -80,7 +80,7 @@ new_server_schema = {
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "minecraft_java",
|
"default": "minecraft_java",
|
||||||
"enum": ["minecraft_java", "minecraft_bedrock", "none"],
|
"enum": ["minecraft_java", "minecraft_bedrock", "none"],
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
# TODO: SteamCMD, RakNet, etc.
|
# TODO: SteamCMD, RakNet, etc.
|
||||||
},
|
},
|
||||||
@ -140,7 +140,7 @@ new_server_schema = {
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "minecraft_java",
|
"default": "minecraft_java",
|
||||||
"enum": ["minecraft_java", "minecraft_bedrock", "custom"],
|
"enum": ["minecraft_java", "minecraft_bedrock", "custom"],
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
},
|
},
|
||||||
"minecraft_java_create_data": {
|
"minecraft_java_create_data": {
|
||||||
@ -153,13 +153,13 @@ new_server_schema = {
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "download_jar",
|
"default": "download_jar",
|
||||||
"enum": ["download_jar", "import_server", "import_zip"],
|
"enum": ["download_jar", "import_server", "import_zip"],
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
},
|
},
|
||||||
"download_jar_create_data": {
|
"download_jar_create_data": {
|
||||||
"title": "JAR download data",
|
"title": "JAR download data",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
"required": [
|
"required": [
|
||||||
"type",
|
"type",
|
||||||
@ -173,7 +173,7 @@ new_server_schema = {
|
|||||||
"title": "Jar Category",
|
"title": "Jar Category",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"examples": ["Mc_java_servers", "Mc_java_proxies"],
|
"examples": ["Mc_java_servers", "Mc_java_proxies"],
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -232,7 +232,7 @@ new_server_schema = {
|
|||||||
"import_server_create_data": {
|
"import_server_create_data": {
|
||||||
"title": "Import server data",
|
"title": "Import server data",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
"required": [
|
"required": [
|
||||||
"existing_server_path",
|
"existing_server_path",
|
||||||
@ -299,7 +299,7 @@ new_server_schema = {
|
|||||||
"import_zip_create_data": {
|
"import_zip_create_data": {
|
||||||
"title": "Import ZIP server data",
|
"title": "Import ZIP server data",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
"required": [
|
"required": [
|
||||||
"zip_path",
|
"zip_path",
|
||||||
@ -418,13 +418,13 @@ new_server_schema = {
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "import_server",
|
"default": "import_server",
|
||||||
"enum": ["download_exe", "import_server", "import_zip"],
|
"enum": ["download_exe", "import_server", "import_zip"],
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
},
|
},
|
||||||
"download_exe_create_data": {
|
"download_exe_create_data": {
|
||||||
"title": "Import server data",
|
"title": "Import server data",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
"required": [],
|
"required": [],
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -438,7 +438,7 @@ new_server_schema = {
|
|||||||
"import_server_create_data": {
|
"import_server_create_data": {
|
||||||
"title": "Import server data",
|
"title": "Import server data",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
"required": ["existing_server_path", "executable"],
|
"required": ["existing_server_path", "executable"],
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -475,7 +475,7 @@ new_server_schema = {
|
|||||||
"import_zip_create_data": {
|
"import_zip_create_data": {
|
||||||
"title": "Import ZIP server data",
|
"title": "Import ZIP server data",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
"required": ["zip_path", "zip_root", "command"],
|
"required": ["zip_path", "zip_root", "command"],
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -562,7 +562,7 @@ new_server_schema = {
|
|||||||
"custom_create_data": {
|
"custom_create_data": {
|
||||||
"title": "Custom creation data",
|
"title": "Custom creation data",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
"required": [
|
"required": [
|
||||||
"working_directory",
|
"working_directory",
|
||||||
@ -583,7 +583,7 @@ new_server_schema = {
|
|||||||
"title": "Executable Updation",
|
"title": "Executable Updation",
|
||||||
"description": "Also configurable later on and for other servers",
|
"description": "Also configurable later on and for other servers",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
"required": ["enabled", "file", "url"],
|
"required": ["enabled", "file", "url"],
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -616,7 +616,7 @@ new_server_schema = {
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "raw_exec",
|
"default": "raw_exec",
|
||||||
"enum": ["raw_exec", "import_server", "import_zip"],
|
"enum": ["raw_exec", "import_server", "import_zip"],
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
},
|
},
|
||||||
"raw_exec_create_data": {
|
"raw_exec_create_data": {
|
||||||
@ -638,7 +638,7 @@ new_server_schema = {
|
|||||||
"import_server_create_data": {
|
"import_server_create_data": {
|
||||||
"title": "Import server data",
|
"title": "Import server data",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
"required": ["existing_server_path", "command"],
|
"required": ["existing_server_path", "command"],
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -665,7 +665,7 @@ new_server_schema = {
|
|||||||
"import_zip_create_data": {
|
"import_zip_create_data": {
|
||||||
"title": "Import ZIP server data",
|
"title": "Import ZIP server data",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"error": "serverAPI",
|
"error": "enumErr",
|
||||||
"fill": True,
|
"fill": True,
|
||||||
"required": ["zip_path", "zip_root", "command"],
|
"required": ["zip_path", "zip_root", "command"],
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -829,14 +829,14 @@ class ApiServersIndexHandler(BaseApiHandler):
|
|||||||
try:
|
try:
|
||||||
validate(data, new_server_schema)
|
validate(data, new_server_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
|
@ -276,14 +276,14 @@ class ApiServersServerFilesIndexHandler(BaseApiHandler):
|
|||||||
try:
|
try:
|
||||||
validate(data, file_delete_schema)
|
validate(data, file_delete_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
@ -342,14 +342,14 @@ class ApiServersServerFilesIndexHandler(BaseApiHandler):
|
|||||||
try:
|
try:
|
||||||
validate(data, files_patch_schema)
|
validate(data, files_patch_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
@ -404,14 +404,14 @@ class ApiServersServerFilesIndexHandler(BaseApiHandler):
|
|||||||
try:
|
try:
|
||||||
validate(data, files_create_schema)
|
validate(data, files_create_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
@ -479,14 +479,14 @@ class ApiServersServerFilesCreateHandler(BaseApiHandler):
|
|||||||
try:
|
try:
|
||||||
validate(data, files_rename_schema)
|
validate(data, files_rename_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
@ -553,14 +553,14 @@ class ApiServersServerFilesCreateHandler(BaseApiHandler):
|
|||||||
try:
|
try:
|
||||||
validate(data, files_create_schema)
|
validate(data, files_create_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
@ -628,14 +628,14 @@ class ApiServersServerFilesZipHandler(BaseApiHandler):
|
|||||||
try:
|
try:
|
||||||
validate(data, files_unzip_schema)
|
validate(data, files_unzip_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
|
@ -214,14 +214,14 @@ class ApiServersServerIndexHandler(BaseApiHandler):
|
|||||||
else:
|
else:
|
||||||
validate(data, basic_server_patch_schema)
|
validate(data, basic_server_patch_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
|
@ -100,14 +100,14 @@ class ApiServersServerWebhooksIndexHandler(BaseApiHandler):
|
|||||||
try:
|
try:
|
||||||
validate(data, new_webhook_schema)
|
validate(data, new_webhook_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
|
@ -138,14 +138,14 @@ class ApiServersServerWebhooksManagementIndexHandler(BaseApiHandler):
|
|||||||
try:
|
try:
|
||||||
validate(data, webhook_patch_schema)
|
validate(data, webhook_patch_schema)
|
||||||
except ValidationError as why:
|
except ValidationError as why:
|
||||||
offending_key = None
|
offending_key = ""
|
||||||
if why.get("fill", None):
|
if why.schema.get("fill", None):
|
||||||
offending_key = why.path[0] if why.path else None
|
offending_key = why.path[0] if why.path else None
|
||||||
err = f"""{self.translator.translate(
|
err = f"""{offending_key} {self.translator.translate(
|
||||||
"validators",
|
"validators",
|
||||||
why.schema.get("error"),
|
why.schema.get("error"),
|
||||||
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
self.controller.users.get_user_lang_by_id(auth_data[4]["user_id"]),
|
||||||
)} {offending_key}"""
|
)} {why.schema.get("enum", "")}"""
|
||||||
return self.finish_json(
|
return self.finish_json(
|
||||||
400,
|
400,
|
||||||
{
|
{
|
||||||
|
@ -668,21 +668,22 @@
|
|||||||
"uses": "Number of uses allowed (-1==No Limit)"
|
"uses": "Number of uses allowed (-1==No Limit)"
|
||||||
},
|
},
|
||||||
"validators": {
|
"validators": {
|
||||||
"filesPageLen": "Length must be greater than 1 for property for prop",
|
"enumErr": "failed validating. Acceptable data includes: ",
|
||||||
|
"filesPageLen": "length must be greater than 1 for property",
|
||||||
"passLength": "Password Too Short. Minimum Length: 8",
|
"passLength": "Password Too Short. Minimum Length: 8",
|
||||||
"roleManager": "Role manager must be of type integer (manager ID) or None",
|
"roleManager": "Role manager must be of type integer (manager ID) or None",
|
||||||
"roleName": "Role name must be a string that is greater than 1 character. It must not include any of the following symbols: [ ] , ",
|
"roleName": "Role name must be a string that is greater than 1 character. It must not include any of the following symbols: [ ] , ",
|
||||||
"roleServerId": "Server ID property must be a string with a minimum length of 1",
|
"roleServerId": "Server ID property must be a string with a minimum length of 1",
|
||||||
"roleServerPerms": "Server permissions must be an 8-bit string",
|
"roleServerPerms": "Server permissions must be an 8-bit string",
|
||||||
"serverAPI": "Invalid Input detected. Please see API docs for information on ",
|
|
||||||
"serverCreateName": "Server name must be a string with a minimum length of 2 and must not include: \\ / or # ",
|
"serverCreateName": "Server name must be a string with a minimum length of 2 and must not include: \\ / or # ",
|
||||||
"serverExeCommand": "Server execution command must be a string with a minimum length of 1.",
|
"serverExeCommand": "Server execution command must be a string with a minimum length of 1.",
|
||||||
"serverLogPath": "Server log path must be a string with a minimum length of 1",
|
"serverLogPath": "Server log path must be a string with a minimum length of 1",
|
||||||
"typeBool": "Type error: True or False required for ",
|
"taskIntervalType": "Task Interval Type must be one of the following: ",
|
||||||
"typeInteger": "Type error: Integer required for ",
|
"typeBool": "Type error: True or False required",
|
||||||
"typeIntMinVal0": "Must be an integer with a minimum value of 0 for prop ",
|
"typeInteger": "Type error: Integer required",
|
||||||
"typeList": "Type error: List required for ",
|
"typeIntMinVal0": "must be an integer with a minimum value of 0",
|
||||||
"typeString": "Type error: String required for "
|
"typeList": "Type error: List required ",
|
||||||
|
"typeString": "Type error: String required"
|
||||||
},
|
},
|
||||||
"webhooks": {
|
"webhooks": {
|
||||||
"areYouSureDel": "Are you sure you want to delete this webhook?",
|
"areYouSureDel": "Are you sure you want to delete this webhook?",
|
||||||
|
Loading…
Reference in New Issue
Block a user