...
Code Block |
---|
{ "id": "api.user.feed.update/delete", "ver": "v1", "ts": "2021-05-07 06:54:22:856+0000", "params": { "resmsgid": null, "msgid": "814e2ade1965ede9dce2fe6fac2bc61d", "err": null, "status": "success", "errmsg": null }, "responseCode": "OK", "result": { "response": "SUCCESS" } } |
Proposed solutions
...
:
Solution 1: Generic solution
Triggering notification will be handled from CSL side
inside on click event handler, we’ll make a generic method in the portal side.
This will make sure irrespective of the category (user-feed, group-feed, etc), it will perform the defined action.
There won't be any hardcoded checks before redirecting.
redirection URL will also be part of the response.
Pros:
It can be used later as well.
There will not be any code changes required for this if it becomes generic.
Cons:
Since it is hardcoded in the portal side to support Category type as “notification“ to show the notifications, we need to make some code changes
Solution 2: Only to handle groups scenario:
create a method in group service.
It will take care of the redirection based on the category (group-feed).
It will only be bound to groups scenario.
Pros:
less code change
Cons:
It will be only related to groups scenario.
if any new requirements come, we need to modify the code once again.