diff options
author | Emiliano Ciavatta | 2020-04-15 10:10:21 +0000 |
---|---|---|
committer | Emiliano Ciavatta | 2020-04-15 10:10:21 +0000 |
commit | a32ff72dfe0c2aba3e51bd9536d5e11a30a9d73d (patch) | |
tree | 4d7b0f9e6b4b5dfeda26328df31b773919cf0d79 /routes.go | |
parent | a56a4e391d541ae05de0203f3d493edc3b04681d (diff) |
Add rules_manager tests
Diffstat (limited to 'routes.go')
-rw-r--r-- | routes.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -57,8 +57,10 @@ func ApplicationRoutes(engine *gin.Engine, rulesManager RulesManager) { return } - updated := rulesManager.UpdateRule(c, id, rule) - if !updated { + updated, err := rulesManager.UpdateRule(c, id, rule) + if err != nil { + badRequest(c, err) + } else if !updated { notFound(c, UnorderedDocument{"id": id}) } else { success(c, rule) |