mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
feat: added CRUD operation for issue subscriber
This commit is contained in:
parent
9fd245a53c
commit
b22e062576
@ -534,11 +534,11 @@ class IssueLiteSerializer(BaseSerializer):
|
||||
|
||||
|
||||
class IssueSubscriberSerializer(BaseSerializer):
|
||||
project = serializers.PrimaryKeyRelatedField(read_only=True)
|
||||
workspace = serializers.PrimaryKeyRelatedField(read_only=True)
|
||||
issue = serializers.PrimaryKeyRelatedField(read_only=True)
|
||||
subscriber = serializers.PrimaryKeyRelatedField(read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = IssueSubscriber
|
||||
fields = "__all__"
|
||||
read_only_fields = [
|
||||
"workspace",
|
||||
"project",
|
||||
"issue",
|
||||
]
|
||||
|
@ -801,16 +801,34 @@ urlpatterns = [
|
||||
## End IssueComments
|
||||
# Issue Subscribers
|
||||
path(
|
||||
"workspaces/<str:slug>/projects/<uuid:project_id>/issues/<uuid:issue_id>/subscribers/",
|
||||
"workspaces/<str:slug>/projects/<uuid:project_id>/issues/<uuid:issue_id>/issue-subscribers/",
|
||||
IssueSubscriberViewSet.as_view(
|
||||
{
|
||||
"get": "list",
|
||||
"post": "create",
|
||||
}
|
||||
),
|
||||
name="project-issue-subscriber",
|
||||
),
|
||||
path(
|
||||
"workspaces/<str:slug>/projects/<uuid:project_id>/issues/<uuid:issue_id>/issue-subscribers/<uuid:subscriber_id>",
|
||||
IssueSubscriberViewSet.as_view(
|
||||
{
|
||||
"delete": "destroy"
|
||||
}
|
||||
),
|
||||
name="project-issue-subscriber",
|
||||
),
|
||||
path(
|
||||
"workspaces/<str:slug>/projects/<uuid:project_id>/issues/<uuid:issue_id>/subscribe/",
|
||||
IssueSubscriberViewSet.as_view(
|
||||
{
|
||||
"get": "subscription_status",
|
||||
"post": "subscribe",
|
||||
}
|
||||
),
|
||||
name="project-issue-subscriber",
|
||||
),
|
||||
## End Issue Subscribers
|
||||
## IssueProperty
|
||||
path(
|
||||
|
Loading…
Reference in New Issue
Block a user