novuhq / novu

Open-Source Notification Platform. Embeddable Notification Center, E-mail, Push and Slack Integrations.
https://novu.co
Other
34.71k stars 3.56k forks source link

🐛 Bug Report: markAs endpoint in 0.9 #2234

Closed niblasobr closed 5 months ago

niblasobr commented 1 year ago

📜 Description

Dear all

I think in the API reference documentation there's a bug in Mark a subscriber feed message as seen:

The noted path is:

/v1/subscribers/:subscriberId/messages/markAs

I think there's missing the messageId?

Shouldn't it be /v1/subscribers/:subscriberId/messages/:messageId/markAs?

👟 Reproduction steps

Bug in the documentation. See above.

👍 Expected behavior

Should have a :messageId in the path?

👎 Actual Behavior with Screenshots

Missing property

💻 Operating system

Something else

🤖 Node Version

📃 Provide any additional context for the Bug.

No response

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

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

scopsy commented 1 year ago

Hi @niblasobr seems like there is a bug in the swagger, but it accepts the body of:

{ messageId: string | string[]; mark: { seen?: boolean; read?: boolean } }

So. the message id goes in the body and not on the param, will take a look at the swagger doc to make sure it's accurate

jonaszeier commented 1 year ago

https://docs.novu.co/api/update-subscriber-credentials/ seems to be wrong, too. The Object 0 in credentials shouldn't be there. Instead webhookUrl and deviceTokens should be fields of credentials. I think the Swagger doc is correct.