Skip to content

Commit

Permalink
Merge pull request #97 from JongbeomLee623/feature/ljb-manager-mk2
Browse files Browse the repository at this point in the history
🐛 Fix: manager/booth serializer 수정 및 프로젝트 urls.py trailing slash 삭제
  • Loading branch information
JongbeomLee623 authored Oct 6, 2024
2 parents 1188da4 + 0ea4c84 commit 3479a0e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions accounts/urls.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
from django.urls import path, include
from .views import *
from dj_rest_auth.views import LoginView, LogoutView

app_name = 'accounts'

urlpatterns = [
# 일반 로그인 / 회원가입
path('dj-rest-auth/', include('dj_rest_auth.urls')),
path('dj-rest-auth/registration/', include('dj_rest_auth.registration.urls')),
path('allauth/', include('allauth.urls')),
path('accounts/login', LoginView.as_view(), name='login'),
path('accounts/logout', LogoutView.as_view(), name='logout'),
path('accounts/registration', include('dj_rest_auth.registration.urls')),
# path('dj-rest-auth/', include('dj_rest_auth.urls')),
# path('dj-rest-auth/registration/', include('dj_rest_auth.registration.urls')),
# path('allauth/', include('allauth.urls')),

# 회원 탈퇴
path('accounts/withdraw/', WithdrawUserView.as_view(), name='withdraw'),
path('accounts/withdraw', WithdrawUserView.as_view(), name='withdraw'),
]
4 changes: 4 additions & 0 deletions linenow/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@
# 백엔드 도메인 또는 IP주소
'https://211.188.52.202',
'https://linenow.xyz'
'http://linenow-manager.co.kr',
'https://linenow-manager.co.kr',
'http://linenow.co.kr',
'https://linenow.co.kr'
]

# Celery 관련 설정
Expand Down
6 changes: 3 additions & 3 deletions manager/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ class BoothWaitingSerializer(serializers.ModelSerializer):
class Meta:
model = Waiting
fields = [
'id', 'user', 'party_size', 'waiting_status', 'ready_to_confirm_at',
'id', 'user', 'party_size', 'waiting_status', 'registered_at','ready_to_confirm_at',
'confirmed_at', 'canceled_at', 'confirm_due_time', 'arrival_due_time'
]

# 사용자 정보 반환 (이름과 전화번호)
def get_user(self, obj):
return {
# "phone_number": obj.user.phone_number,
"name": obj.user.username
"phone_number": obj.user.phone_number,
"name": obj.user.name
}

# 3분 더한 시간 반환
Expand Down
2 changes: 1 addition & 1 deletion waiting/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from rest_framework.routers import DefaultRouter
from .views import WaitingViewSet

router = DefaultRouter()
router = DefaultRouter(trailing_slash=False)
router.register(r'waitings', WaitingViewSet, basename='waiting')

urlpatterns = [
Expand Down

0 comments on commit 3479a0e

Please sign in to comment.