mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 05:07:10 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -13,7 +13,7 @@ router = Router(tags=["competition"])
|
||||
|
||||
|
||||
@router.get(
|
||||
"competition/{competition_id}",
|
||||
"competitions/{competition_id}",
|
||||
response={
|
||||
status.OK: schemas.CompetitionOut,
|
||||
status.BAD_REQUEST: global_schemas.BadRequestError,
|
||||
|
||||
@@ -75,7 +75,7 @@ def get_me(request):
|
||||
|
||||
|
||||
@router.get(
|
||||
path="/user/{user_id}",
|
||||
path="/users/{user_id}",
|
||||
response={
|
||||
status.OK: UserSchema,
|
||||
status.BAD_REQUEST: BadRequestError,
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 5.1.6 on 2025-03-02 14:03
|
||||
|
||||
import apps.achievement.models
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('achievement', '0003_remove_achievement_need_count_and_more_squashed_0004_alter_achievement_slug'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='achievement',
|
||||
name='icon',
|
||||
field=models.ImageField(upload_to=apps.achievement.models.Achievement.image_url_upload_to, verbose_name='иконка достижения'),
|
||||
),
|
||||
]
|
||||
@@ -14,7 +14,7 @@ class Achievement(BaseModel):
|
||||
max_length=30, verbose_name="название", unique=True
|
||||
)
|
||||
description = models.TextField(verbose_name="описание")
|
||||
icon = models.FileField(
|
||||
icon = models.ImageField(
|
||||
verbose_name="иконка достижения",
|
||||
upload_to=image_url_upload_to,
|
||||
)
|
||||
|
||||
@@ -11,7 +11,7 @@ class CheckerHealthCheck(BaseHealthCheckBackend):
|
||||
def check_status(self) -> None:
|
||||
try:
|
||||
response = httpx.get(
|
||||
f"{settings.CHECKER_API_ENDPOINT}/ping", timeout=1
|
||||
f"{settings.CHECKER_API_ENDPOINT}/health", timeout=10
|
||||
)
|
||||
if response.status_code >= status.INTERNAL_SERVER_ERROR:
|
||||
self.add_error("Checker service is unaccessible")
|
||||
|
||||
Reference in New Issue
Block a user