Skip to content

Commit

Permalink
Добавлено поле ruled_team в ответ users (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reagent992 authored Feb 1, 2024
1 parent fac298b commit 42cedd6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions api/v1/serializers/api/users_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class CustomUserSerializer(UserSerializer):
"""Сериализатор пользователей."""

position = serializers.CharField(source="position.name", read_only=True)
ruled_team = serializers.IntegerField(
source="managed_team.id", read_only=True
)

class Meta:
model = User
Expand All @@ -35,5 +38,6 @@ class Meta:
"date_joined",
"last_login",
"userpic",
"ruled_team",
"team",
)
13 changes: 7 additions & 6 deletions nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ server {
listen 80;
server_name _;

proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 10m;

location /static/ {
alias /static/;
alias /static/;
}

location / {
proxy_pass http://backend:8000;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 10m;
alias /static/;
}
}

0 comments on commit 42cedd6

Please sign in to comment.