# What this PR does This PR fixes templates behaviour for public and private api. It fix "reset to default" for templates from messaging backends and some minor bugs. Also added acknowledge signal and source link templates ## Checklist - [x] Tests updated - [x] Documentation added - [x] `CHANGELOG.md` updated
19 lines
656 B
Python
19 lines
656 B
Python
from rest_framework.permissions import IsAuthenticated
|
|
from rest_framework.response import Response
|
|
from rest_framework.views import APIView
|
|
|
|
from apps.auth_token.auth import PluginAuthentication
|
|
from common.api_helpers.mixins import ALL_TEMPLATE_NAMES, NOTIFICATION_CHANNEL_OPTIONS
|
|
|
|
|
|
class PreviewTemplateOptionsView(APIView):
|
|
authentication_classes = (PluginAuthentication,)
|
|
permission_classes = (IsAuthenticated,)
|
|
|
|
def get(self, request):
|
|
return Response(
|
|
{
|
|
"notification_channel_options": NOTIFICATION_CHANNEL_OPTIONS,
|
|
"template_name_options": ALL_TEMPLATE_NAMES,
|
|
}
|
|
)
|