Skip to content

🐛 Bug Report: PATCH /credentials creates a resource #8660

@denissafiullin-deriv

Description

@denissafiullin-deriv

📜 Description

Based on PATCH verb description it serves as a set of instructions for modifying a resource. It should not create a resource.

👟 Reproduction steps

  1. Call https://docs.novu.co/api-reference/subscribers/upsert-provider-credentials with body for a subscriber with no credentials previously created:
{
    "providerId": "fcm",
    "credentials": {
        "deviceTokens": [
            "token1",
            "token2"
        ]
    }
}
  1. Check subscriber profile -> credentials are added to the profile.

👍 Expected behavior

404 Not Found

👎 Actual Behavior with Screenshots

It actually creates the resource.

Novu version

Novu SaaS

npm version

No response

node version

No response

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions