Rework utils/restendpointhelper to use the new chi router functionality (#3750)

* Remove old implementation, add new function to work with the chi router

* Use new URL Param function to get clientID instead

* Remove usage of old restendpoint functions

* Fix typo in url param name

* Remove unused tests
This commit is contained in:
mahmed2000
2024-05-31 00:31:07 +05:00
committed by GitHub
parent a529502809
commit 414a8aeed8
4 changed files with 9 additions and 103 deletions

View File

@@ -261,7 +261,7 @@ func SendSystemMessage(integration user.ExternalAPIUser, w http.ResponseWriter,
// SendSystemMessageToConnectedClient will handle incoming requests to send a single message to a single connected client by ID.
func SendSystemMessageToConnectedClient(integration user.ExternalAPIUser, w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
clientIDText, err := utils.ReadRestURLParameter(r, "clientId")
clientIDText, err := utils.GetURLParam(r, "clientId")
if err != nil {
controllers.BadRequestHandler(w, err)
return