This commit is contained in:
rngsurrounded
2025-03-04 06:06:16 +09:00
3 changed files with 18 additions and 31 deletions
+17 -17
View File
@@ -10,15 +10,15 @@ from apps.team.models import Team
router = Router()
@router.post(
"",
response={
201: TeamSchemaOut,
400: BadRequestError,
401: UnauthorizedError,
},
description="Create team. Note: members array must have team members uuid, default can be empty",
)
# @router.post(
# "",
# response={
# 201: TeamSchemaOut,
# 400: BadRequestError,
# 401: UnauthorizedError,
# },
# description="Create team. Note: members array must have team members uuid, default can be empty",
# )
def create_team(request, team_data: CreateTeamSchema) -> (int, TeamSchemaOut):
team = Team(name=team_data.name, owner=request.auth)
team.members.add(request.auth)
@@ -26,13 +26,13 @@ def create_team(request, team_data: CreateTeamSchema) -> (int, TeamSchemaOut):
return 201, team
@router.get(
"{team_id}",
response={
200: TeamSchemaOut,
401: UnauthorizedError,
404: NotFoundError,
},
)
# @router.get(
# "{team_id}",
# response={
# 200: TeamSchemaOut,
# 401: UnauthorizedError,
# 404: NotFoundError,
# },
# )
def get_team(request, team_id: UUID) -> (int, TeamSchemaOut):
return get_object_or_404(Team, pk=team_id)
+1 -1
View File
@@ -18,7 +18,7 @@ def analyze_data_task(self, submission_id):
files = [
{
"url": (
f"{settings.MINIO_DEFAULT_CUSTOM_ENDPOINT_URL}/"
f"{settings.MINIO_DEFAULT_CUSTOM_ENDPOINT_URL}"
f"{urlparse(attachment.file.url).path}"
),
"bind_path": attachment.bind_at,
-13
View File
@@ -1,13 +0,0 @@
from django.contrib import admin
from apps.team.models import Team
@admin.register(Team)
class TeamAdmin(admin.ModelAdmin):
list_display = ("name", "owner")
search_fields = (
"name",
"owner",
"members",
)