update serilaizer
This commit is contained in:
@@ -39,7 +39,7 @@ class NewsSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = NewsModel
|
||||
fields = ['title', 'content', 'image', 'created_at', 'notif_type']
|
||||
fields = ['title', 'content', 'created_at', 'notif_type']
|
||||
|
||||
def get_notif_type(self, obj):
|
||||
return 'NEWS'
|
||||
@@ -49,7 +49,7 @@ class UserNotifSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = UserNotificationModel
|
||||
fields = ['title', 'content', 'image', 'created_at', 'notif_type', 'is_read']
|
||||
fields = ['title', 'content', 'created_at', 'notif_type', 'is_read']
|
||||
|
||||
def get_notif_type(self, obj):
|
||||
return 'USER_NOTIF'
|
||||
|
||||
Reference in New Issue
Block a user