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):
|
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:
|
class Meta:
|
||||||
model = IssueSubscriber
|
model = IssueSubscriber
|
||||||
fields = "__all__"
|
fields = "__all__"
|
||||||
|
read_only_fields = [
|
||||||
|
"workspace",
|
||||||
|
"project",
|
||||||
|
"issue",
|
||||||
|
]
|
||||||
|
@ -801,16 +801,34 @@ urlpatterns = [
|
|||||||
## End IssueComments
|
## End IssueComments
|
||||||
# Issue Subscribers
|
# Issue Subscribers
|
||||||
path(
|
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(
|
IssueSubscriberViewSet.as_view(
|
||||||
{
|
{
|
||||||
"get": "list",
|
"get": "list",
|
||||||
"post": "create",
|
"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"
|
"delete": "destroy"
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
name="project-issue-subscriber",
|
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
|
## End Issue Subscribers
|
||||||
## IssueProperty
|
## IssueProperty
|
||||||
path(
|
path(
|
||||||
|
Loading…
Reference in New Issue
Block a user