diff --git a/crm/docs/README.md b/crm/docs/README.md index 1d679bb2a..5961505f2 100644 --- a/crm/docs/README.md +++ b/crm/docs/README.md @@ -202,7 +202,7 @@ CRM module definitions | URI | Protocol | Method | Authentication | | --- | -------- | ------ | -------------- | -| `/module/{module}/content` | HTTP/S | GET | | +| `/module/{moduleID}/content` | HTTP/S | GET | | #### Request parameters @@ -218,7 +218,7 @@ CRM module definitions | URI | Protocol | Method | Authentication | | --- | -------- | ------ | -------------- | -| `/module/{module}/content` | HTTP/S | POST | | +| `/module/{moduleID}/content` | HTTP/S | POST | | #### Request parameters @@ -233,7 +233,7 @@ CRM module definitions | URI | Protocol | Method | Authentication | | --- | -------- | ------ | -------------- | -| `/module/{module}/content/{id}` | HTTP/S | GET | | +| `/module/{moduleID}/content/{id}` | HTTP/S | GET | | #### Request parameters @@ -248,7 +248,7 @@ CRM module definitions | URI | Protocol | Method | Authentication | | --- | -------- | ------ | -------------- | -| `/module/{module}/content/{id}` | HTTP/S | POST | | +| `/module/{moduleID}/content/{id}` | HTTP/S | POST | | #### Request parameters @@ -264,7 +264,7 @@ CRM module definitions | URI | Protocol | Method | Authentication | | --- | -------- | ------ | -------------- | -| `/module/{module}/content/{id}` | HTTP/S | DELETE | | +| `/module/{moduleID}/content/{id}` | HTTP/S | DELETE | | #### Request parameters diff --git a/crm/docs/src/spec.json b/crm/docs/src/spec.json index fe99d0bdb..85656cad0 100644 --- a/crm/docs/src/spec.json +++ b/crm/docs/src/spec.json @@ -216,7 +216,7 @@ "name": "content/list", "method": "GET", "title": "List/read contents from module section", - "path": "/{module}/content", + "path": "/{moduleID}/content", "parameters": { "path": [ { "type": "uint64", "name": "moduleID", "required": true, "title": "Module ID" } @@ -231,7 +231,7 @@ "name": "content/create", "method": "POST", "title": "List/read contents from module section", - "path": "/{module}/content", + "path": "/{moduleID}/content", "parameters": { "path": [ { "type": "uint64", "name": "moduleID", "required": true, "title": "Module ID" } @@ -245,7 +245,7 @@ "name": "content/read", "method": "GET", "title": "Read contents by ID from module section", - "path": "/{module}/content/{id}", + "path": "/{moduleID}/content/{id}", "parameters": { "path": [ { "type": "uint64", "name": "moduleID", "required": true, "title": "Module ID" }, @@ -257,7 +257,7 @@ "name": "content/edit", "method": "POST", "title": "Add/update contents in module section", - "path": "/{module}/content/{id}", + "path": "/{moduleID}/content/{id}", "parameters": { "path": [ { "type": "uint64", "name": "moduleID", "required": true, "title": "Module ID" }, @@ -272,7 +272,7 @@ "name": "content/delete", "method": "DELETE", "title": "Delete content row from module section", - "path": "/{module}/content/{id}", + "path": "/{moduleID}/content/{id}", "parameters": { "path": [ { "type": "uint64", "name": "moduleID", "required": true, "title": "Module ID" }, diff --git a/crm/docs/src/spec/module.json b/crm/docs/src/spec/module.json index 0fb282369..2249a0839 100644 --- a/crm/docs/src/spec/module.json +++ b/crm/docs/src/spec/module.json @@ -182,7 +182,7 @@ "Name": "content/list", "Method": "GET", "Title": "List/read contents from module section", - "Path": "/{module}/content", + "Path": "/{moduleID}/content", "Parameters": { "get": [ { @@ -212,7 +212,7 @@ "Name": "content/create", "Method": "POST", "Title": "List/read contents from module section", - "Path": "/{module}/content", + "Path": "/{moduleID}/content", "Parameters": { "path": [ { @@ -236,7 +236,7 @@ "Name": "content/read", "Method": "GET", "Title": "Read contents by ID from module section", - "Path": "/{module}/content/{id}", + "Path": "/{moduleID}/content/{id}", "Parameters": { "path": [ { @@ -258,7 +258,7 @@ "Name": "content/edit", "Method": "POST", "Title": "Add/update contents in module section", - "Path": "/{module}/content/{id}", + "Path": "/{moduleID}/content/{id}", "Parameters": { "path": [ { @@ -288,7 +288,7 @@ "Name": "content/delete", "Method": "DELETE", "Title": "Delete content row from module section", - "Path": "/{module}/content/{id}", + "Path": "/{moduleID}/content/{id}", "Parameters": { "path": [ { diff --git a/crm/rest/handlers/module.go b/crm/rest/handlers/module.go index 1cdc3c7f4..5f1fd8f97 100644 --- a/crm/rest/handlers/module.go +++ b/crm/rest/handlers/module.go @@ -137,11 +137,11 @@ func (mh *Module) MountRoutes(r chi.Router, middlewares ...func(http.Handler) ht r.Get("/{id}", mh.Read) r.Post("/{id}", mh.Edit) r.Delete("/{id}", mh.Delete) - r.Get("/{module}/content", mh.ContentList) - r.Post("/{module}/content", mh.ContentCreate) - r.Get("/{module}/content/{id}", mh.ContentRead) - r.Post("/{module}/content/{id}", mh.ContentEdit) - r.Delete("/{module}/content/{id}", mh.ContentDelete) + r.Get("/{moduleID}/content", mh.ContentList) + r.Post("/{moduleID}/content", mh.ContentCreate) + r.Get("/{moduleID}/content/{id}", mh.ContentRead) + r.Post("/{moduleID}/content/{id}", mh.ContentEdit) + r.Delete("/{moduleID}/content/{id}", mh.ContentDelete) }) }) }