From 92bc8a42e2406d7af14464225407dd30e76fbca4 Mon Sep 17 00:00:00 2001 From: SUMUKHA-PK Date: Sat, 23 Mar 2019 22:59:48 +0530 Subject: [PATCH] StatusOK returned on no tags found --- .../matrix-org/dendrite/clientapi/routing/room_tagging.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/clientapi/routing/room_tagging.go b/src/github.com/matrix-org/dendrite/clientapi/routing/room_tagging.go index 36fbffd20..8c2a9988e 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/routing/room_tagging.go +++ b/src/github.com/matrix-org/dendrite/clientapi/routing/room_tagging.go @@ -20,7 +20,6 @@ import ( "github.com/matrix-org/dendrite/clientapi/auth/storage/accounts" "github.com/matrix-org/dendrite/clientapi/httputil" - "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/common" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" @@ -133,10 +132,9 @@ func DeleteTag( return httputil.LogThenError(req, err) } } else { - //Error indicating there is no Tag data return util.JSONResponse{ - Code: http.StatusMethodNotAllowed, - JSON: jsonerror.NotFound("No Tag Exists"), + Code: http.StatusOK, + JSON: struct{}{}, } } @@ -145,7 +143,7 @@ func DeleteTag( delete(mtag.Tags, tag) } else { return util.JSONResponse{ - Code: http.StatusMethodNotAllowed, + Code: http.StatusOK, JSON: struct{}{}, } }