StatusOK returned on no tags found

This commit is contained in:
SUMUKHA-PK 2019-03-23 22:59:48 +05:30
parent 88dd800762
commit 92bc8a42e2

View file

@ -20,7 +20,6 @@ import (
"github.com/matrix-org/dendrite/clientapi/auth/storage/accounts" "github.com/matrix-org/dendrite/clientapi/auth/storage/accounts"
"github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/httputil"
"github.com/matrix-org/dendrite/clientapi/jsonerror"
"github.com/matrix-org/dendrite/common" "github.com/matrix-org/dendrite/common"
"github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/util" "github.com/matrix-org/util"
@ -133,10 +132,9 @@ func DeleteTag(
return httputil.LogThenError(req, err) return httputil.LogThenError(req, err)
} }
} else { } else {
//Error indicating there is no Tag data
return util.JSONResponse{ return util.JSONResponse{
Code: http.StatusMethodNotAllowed, Code: http.StatusOK,
JSON: jsonerror.NotFound("No Tag Exists"), JSON: struct{}{},
} }
} }
@ -145,7 +143,7 @@ func DeleteTag(
delete(mtag.Tags, tag) delete(mtag.Tags, tag)
} else { } else {
return util.JSONResponse{ return util.JSONResponse{
Code: http.StatusMethodNotAllowed, Code: http.StatusOK,
JSON: struct{}{}, JSON: struct{}{},
} }
} }