-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web push notification w/ FCM topic #368
base: develop
Are you sure you want to change the base?
Conversation
apps/user/views/fcm.py
Outdated
elif mode == "update": | ||
if not request.user.is_authenticated: | ||
return Response(status=status.HTTP_401_UNAUTHORIZED) | ||
token = FCMToken(token=token, user=request.user, last_activated_at=Now()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기존 다른 코드들에서는 django.utils.timezone.now()
를 사용했었는데 django.db.models.functions.Now()
도 있었군요. 쿼리가 실행되었을 당시의 서버의 날짜와 시각을 반환한다고 하는데 timezone 문제가 발생하지는 않을지 여쭙습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오.. 그 부분은 생각을 못했었어요 last_activated_at
이 그렇게 중요한 컬럼은 아니라서 django.utils.timezone.now()
로 바꾸어도 될 것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 Stack Overflow에서 두 차이를 설명하고 있는데 일단은 혹시 모르니 django.utils.timezone.now()
를 사용합시다.
리뷰 반영했습니다. 우선 아래 이유로 지금 당장 머지할수는 없어서 해결이 된다면 머지를 하겠습니다.
|
a94b1b1
to
a31b4df
Compare
a31b4df
to
4f0831a
Compare
관련 티켓
Feature
TODO 라고 되어 있는 부분 의견 있으시면 알려주세요!