fix restore checkin list
This commit is contained in:
@ -87,15 +87,14 @@ local all postgres peer
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
|
||||
# "local" is for Unix domain socket connections only
|
||||
# md5認証に変更してpeer認証エラーを回避
|
||||
local all all md5
|
||||
local all all peer
|
||||
# IPv4 local connections:
|
||||
host all all 127.0.0.1/32 md5
|
||||
# IPv6 local connections:
|
||||
host all all ::1/128 md5
|
||||
# Allow replication connections from localhost, by a user with the
|
||||
# replication privilege.
|
||||
local replication all md5
|
||||
local replication all peer
|
||||
host replication all 127.0.0.1/32 md5
|
||||
host replication all ::1/128 md5
|
||||
host all all 172.0.0.0/8 md5
|
||||
|
||||
@ -9,6 +9,7 @@ from rog.models import Location2025, NewEvent2, Entry, GpsLog
|
||||
import logging
|
||||
import uuid
|
||||
import os
|
||||
import json
|
||||
from django.db.models import F, Q
|
||||
from django.db import transaction
|
||||
from django.conf import settings
|
||||
@ -1087,11 +1088,32 @@ def get_checkin_list(request):
|
||||
"""
|
||||
logger.info("get_checkin_list called")
|
||||
|
||||
# リクエストからパラメータを取得
|
||||
zekken_number = request.query_params.get('zekken')
|
||||
event_code = request.query_params.get('event')
|
||||
# リクエストからパラメータを取得(GET/POSTの両方に対応)
|
||||
if request.method == 'GET':
|
||||
zekken_number = request.GET.get('zekken')
|
||||
event_code = request.GET.get('event')
|
||||
else: # POST
|
||||
try:
|
||||
data = json.loads(request.body)
|
||||
zekken_number = data.get('zekken')
|
||||
event_code = data.get('event')
|
||||
except:
|
||||
data = request.POST
|
||||
zekken_number = data.get('zekken')
|
||||
event_code = data.get('event')
|
||||
|
||||
logger.debug(f"Parameters: zekken={zekken_number}, event={event_code}")
|
||||
logger.info(f"[GET_CHECKIN_LIST] Request method: {request.method}")
|
||||
logger.info(f"[GET_CHECKIN_LIST] Parameters received - zekken: {zekken_number}, event: {event_code}")
|
||||
logger.info(f"[GET_CHECKIN_LIST] Full GET params: {dict(request.GET.items())}")
|
||||
logger.info(f"[GET_CHECKIN_LIST] Full POST params: {dict(request.POST.items()) if request.method == 'POST' else 'N/A'}")
|
||||
|
||||
# POSTの場合のリクエストボディも確認
|
||||
if request.method == 'POST':
|
||||
try:
|
||||
body_content = request.body.decode('utf-8')
|
||||
logger.info(f"[GET_CHECKIN_LIST] Request body: {body_content}")
|
||||
except:
|
||||
logger.info(f"[GET_CHECKIN_LIST] Could not decode request body")
|
||||
|
||||
# パラメータ検証
|
||||
if not all([zekken_number, event_code]):
|
||||
|
||||
Reference in New Issue
Block a user