feat(devops): Record to check-in table every time feature flags are obtained

ref: #678 #676
This commit is contained in:
2025-03-15 02:21:56 +09:30
parent 0dbde5e1d6
commit 19ce303045

View File

@ -2,6 +2,7 @@ from datetime import datetime
from drf_spectacular.utils import extend_schema, extend_schema_view, OpenApiResponse
from devops.models.check_ins import CheckIn
from devops.serializers.public_feature_flag import (
FeatureFlag,
ViewSerializer,
@ -143,4 +144,12 @@ class ViewSet(PublicReadOnlyViewSet):
response.headers['Last-Modified'] = self.last_modified.strftime('%a, %d %b %Y %H:%M:%S %z')
CheckIn.objects.create(
organization_id = self.kwargs['organization_id'],
software_id = self.kwargs['software_id'],
deployment_id = request.headers['client-id'],
feature = 'feature_flag',
)
return response