This commit is contained in:
j3d1 2024-06-29 16:48:08 +02:00
parent d6aff053fe
commit b81ce42242
2 changed files with 4 additions and 1 deletions

View file

@ -9,6 +9,7 @@ from notifications.models import MessageTemplate, UserNotificationChannel
from rest_framework import serializers from rest_framework import serializers
from notifications.templates import TEMPLATE_VARS from notifications.templates import TEMPLATE_VARS
from authentication.serializers import UserSerializer
class MessageTemplateSerializer(serializers.ModelSerializer): class MessageTemplateSerializer(serializers.ModelSerializer):
@ -18,6 +19,8 @@ class MessageTemplateSerializer(serializers.ModelSerializer):
class UserNotificationChannelSerializer(serializers.ModelSerializer): class UserNotificationChannelSerializer(serializers.ModelSerializer):
user = UserSerializer()
class Meta: class Meta:
model = UserNotificationChannel model = UserNotificationChannel
fields = '__all__' fields = '__all__'

View file

@ -1,7 +1,7 @@
<template> <template>
<ul> <ul>
<li v-for="channel in userNotificationChannels" :key="channel.id"> <li v-for="channel in userNotificationChannels" :key="channel.id">
{{ channel.name }} {{ channel.id }} - {{ channel.channel_type }} - {{ channel.channel_target }} - {{ channel.event_filter }} - {{ channel.active }} - {{ channel.created }} - {{ channel.user }}
</li> </li>
</ul> </ul>
</template> </template>