fix(crm): update url links to match params
This commit is contained in:
+10
-10
@@ -21,7 +21,7 @@ CRM input field definitions
|
||||
|
||||
| URI | Protocol | Method | Authentication |
|
||||
| --- | -------- | ------ | -------------- |
|
||||
| `/field/{id}` | HTTP/S | GET | |
|
||||
| `/field/{typeID}` | HTTP/S | GET | |
|
||||
|
||||
#### Request parameters
|
||||
|
||||
@@ -71,7 +71,7 @@ CRM module definitions
|
||||
|
||||
| URI | Protocol | Method | Authentication |
|
||||
| --- | -------- | ------ | -------------- |
|
||||
| `/module/{id}` | HTTP/S | GET | |
|
||||
| `/module/{moduleID}` | HTTP/S | GET | |
|
||||
|
||||
#### Request parameters
|
||||
|
||||
@@ -85,7 +85,7 @@ CRM module definitions
|
||||
|
||||
| URI | Protocol | Method | Authentication |
|
||||
| --- | -------- | ------ | -------------- |
|
||||
| `/module/{id}` | HTTP/S | POST | |
|
||||
| `/module/{moduleID}` | HTTP/S | POST | |
|
||||
|
||||
#### Request parameters
|
||||
|
||||
@@ -101,7 +101,7 @@ CRM module definitions
|
||||
|
||||
| URI | Protocol | Method | Authentication |
|
||||
| --- | -------- | ------ | -------------- |
|
||||
| `/module/{id}` | HTTP/S | DELETE | |
|
||||
| `/module/{moduleID}` | HTTP/S | DELETE | |
|
||||
|
||||
#### Request parameters
|
||||
|
||||
@@ -146,7 +146,7 @@ CRM module definitions
|
||||
|
||||
| URI | Protocol | Method | Authentication |
|
||||
| --- | -------- | ------ | -------------- |
|
||||
| `/module/{moduleID}/content/{id}` | HTTP/S | GET | |
|
||||
| `/module/{moduleID}/content/{contentID}` | HTTP/S | GET | |
|
||||
|
||||
#### Request parameters
|
||||
|
||||
@@ -161,7 +161,7 @@ CRM module definitions
|
||||
|
||||
| URI | Protocol | Method | Authentication |
|
||||
| --- | -------- | ------ | -------------- |
|
||||
| `/module/{moduleID}/content/{id}` | HTTP/S | POST | |
|
||||
| `/module/{moduleID}/content/{contentID}` | HTTP/S | POST | |
|
||||
|
||||
#### Request parameters
|
||||
|
||||
@@ -177,7 +177,7 @@ CRM module definitions
|
||||
|
||||
| URI | Protocol | Method | Authentication |
|
||||
| --- | -------- | ------ | -------------- |
|
||||
| `/module/{moduleID}/content/{id}` | HTTP/S | DELETE | |
|
||||
| `/module/{moduleID}/content/{contentID}` | HTTP/S | DELETE | |
|
||||
|
||||
#### Request parameters
|
||||
|
||||
@@ -232,7 +232,7 @@ CRM module pages
|
||||
|
||||
| URI | Protocol | Method | Authentication |
|
||||
| --- | -------- | ------ | -------------- |
|
||||
| `/page/{id}` | HTTP/S | GET | |
|
||||
| `/page/{pageID}` | HTTP/S | GET | |
|
||||
|
||||
#### Request parameters
|
||||
|
||||
@@ -246,7 +246,7 @@ CRM module pages
|
||||
|
||||
| URI | Protocol | Method | Authentication |
|
||||
| --- | -------- | ------ | -------------- |
|
||||
| `/page/{id}` | HTTP/S | POST | |
|
||||
| `/page/{pageID}` | HTTP/S | POST | |
|
||||
|
||||
#### Request parameters
|
||||
|
||||
@@ -281,7 +281,7 @@ CRM module pages
|
||||
|
||||
| URI | Protocol | Method | Authentication |
|
||||
| --- | -------- | ------ | -------------- |
|
||||
| `/page/{id}` | HTTP/S | Delete | |
|
||||
| `/page/{pageID}` | HTTP/S | Delete | |
|
||||
|
||||
#### Request parameters
|
||||
|
||||
|
||||
+10
-10
@@ -38,7 +38,7 @@
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"path": "/{id}",
|
||||
"path": "/{typeID}",
|
||||
"method": "GET",
|
||||
"title": "Get field details",
|
||||
"parameters": {
|
||||
@@ -127,7 +127,7 @@
|
||||
},
|
||||
{
|
||||
"name": "read",
|
||||
"path": "/{id}",
|
||||
"path": "/{pageID}",
|
||||
"method": "GET",
|
||||
"title": "Get page details",
|
||||
"parameters": {
|
||||
@@ -145,7 +145,7 @@
|
||||
"name": "edit",
|
||||
"method": "POST",
|
||||
"title": "Create page",
|
||||
"path": "/{id}",
|
||||
"path": "/{pageID}",
|
||||
"parameters": {
|
||||
"path": [
|
||||
{
|
||||
@@ -221,7 +221,7 @@
|
||||
},
|
||||
{
|
||||
"name": "delete",
|
||||
"path": "/{id}",
|
||||
"path": "/{pageID}",
|
||||
"method": "Delete",
|
||||
"title": "Delete page",
|
||||
"parameters": {
|
||||
@@ -357,7 +357,7 @@
|
||||
"name": "read",
|
||||
"method": "GET",
|
||||
"title": "Read module",
|
||||
"path": "/{id}",
|
||||
"path": "/{moduleID}",
|
||||
"parameters": {
|
||||
"path": [
|
||||
{
|
||||
@@ -373,7 +373,7 @@
|
||||
"name": "edit",
|
||||
"method": "POST",
|
||||
"title": "Edit module",
|
||||
"path": "/{id}",
|
||||
"path": "/{moduleID}",
|
||||
"parameters": {
|
||||
"path": [
|
||||
{
|
||||
@@ -403,7 +403,7 @@
|
||||
"name": "delete",
|
||||
"method": "DELETE",
|
||||
"title": "Delete module",
|
||||
"path": "/{id}",
|
||||
"path": "/{moduleID}",
|
||||
"parameters": {
|
||||
"path": [
|
||||
{
|
||||
@@ -473,7 +473,7 @@
|
||||
"name": "content/read",
|
||||
"method": "GET",
|
||||
"title": "Read contents by ID from module section",
|
||||
"path": "/{moduleID}/content/{id}",
|
||||
"path": "/{moduleID}/content/{contentID}",
|
||||
"parameters": {
|
||||
"path": [
|
||||
{
|
||||
@@ -495,7 +495,7 @@
|
||||
"name": "content/edit",
|
||||
"method": "POST",
|
||||
"title": "Add/update contents in module section",
|
||||
"path": "/{moduleID}/content/{id}",
|
||||
"path": "/{moduleID}/content/{contentID}",
|
||||
"parameters": {
|
||||
"path": [
|
||||
{
|
||||
@@ -525,7 +525,7 @@
|
||||
"name": "content/delete",
|
||||
"method": "DELETE",
|
||||
"title": "Delete content row from module section",
|
||||
"path": "/{moduleID}/content/{id}",
|
||||
"path": "/{moduleID}/content/{contentID}",
|
||||
"parameters": {
|
||||
"path": [
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
"Name": "type",
|
||||
"Method": "GET",
|
||||
"Title": "Get field details",
|
||||
"Path": "/{id}",
|
||||
"Path": "/{typeID}",
|
||||
"Parameters": {
|
||||
"path": [
|
||||
{
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
"Name": "read",
|
||||
"Method": "GET",
|
||||
"Title": "Read module",
|
||||
"Path": "/{id}",
|
||||
"Path": "/{moduleID}",
|
||||
"Parameters": {
|
||||
"path": [
|
||||
{
|
||||
@@ -136,7 +136,7 @@
|
||||
"Name": "edit",
|
||||
"Method": "POST",
|
||||
"Title": "Edit module",
|
||||
"Path": "/{id}",
|
||||
"Path": "/{moduleID}",
|
||||
"Parameters": {
|
||||
"path": [
|
||||
{
|
||||
@@ -166,7 +166,7 @@
|
||||
"Name": "delete",
|
||||
"Method": "DELETE",
|
||||
"Title": "Delete module",
|
||||
"Path": "/{id}",
|
||||
"Path": "/{moduleID}",
|
||||
"Parameters": {
|
||||
"path": [
|
||||
{
|
||||
@@ -236,7 +236,7 @@
|
||||
"Name": "content/read",
|
||||
"Method": "GET",
|
||||
"Title": "Read contents by ID from module section",
|
||||
"Path": "/{moduleID}/content/{id}",
|
||||
"Path": "/{moduleID}/content/{contentID}",
|
||||
"Parameters": {
|
||||
"path": [
|
||||
{
|
||||
@@ -258,7 +258,7 @@
|
||||
"Name": "content/edit",
|
||||
"Method": "POST",
|
||||
"Title": "Add/update contents in module section",
|
||||
"Path": "/{moduleID}/content/{id}",
|
||||
"Path": "/{moduleID}/content/{contentID}",
|
||||
"Parameters": {
|
||||
"path": [
|
||||
{
|
||||
@@ -288,7 +288,7 @@
|
||||
"Name": "content/delete",
|
||||
"Method": "DELETE",
|
||||
"Title": "Delete content row from module section",
|
||||
"Path": "/{moduleID}/content/{id}",
|
||||
"Path": "/{moduleID}/content/{contentID}",
|
||||
"Parameters": {
|
||||
"path": [
|
||||
{
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
"Name": "read",
|
||||
"Method": "GET",
|
||||
"Title": "Get page details",
|
||||
"Path": "/{id}",
|
||||
"Path": "/{pageID}",
|
||||
"Parameters": {
|
||||
"path": [
|
||||
{
|
||||
@@ -91,7 +91,7 @@
|
||||
"Name": "edit",
|
||||
"Method": "POST",
|
||||
"Title": "Create page",
|
||||
"Path": "/{id}",
|
||||
"Path": "/{pageID}",
|
||||
"Parameters": {
|
||||
"path": [
|
||||
{
|
||||
@@ -169,7 +169,7 @@
|
||||
"Name": "delete",
|
||||
"Method": "Delete",
|
||||
"Title": "Delete page",
|
||||
"Path": "/{id}",
|
||||
"Path": "/{pageID}",
|
||||
"Parameters": {
|
||||
"path": [
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ func (fh *Field) MountRoutes(r chi.Router, middlewares ...func(http.Handler) htt
|
||||
r.Use(middlewares...)
|
||||
r.Route("/field", func(r chi.Router) {
|
||||
r.Get("/", fh.List)
|
||||
r.Get("/{id}", fh.Type)
|
||||
r.Get("/{typeID}", fh.Type)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -134,14 +134,14 @@ func (mh *Module) MountRoutes(r chi.Router, middlewares ...func(http.Handler) ht
|
||||
r.Route("/module", func(r chi.Router) {
|
||||
r.Get("/", mh.List)
|
||||
r.Post("/", mh.Create)
|
||||
r.Get("/{id}", mh.Read)
|
||||
r.Post("/{id}", mh.Edit)
|
||||
r.Delete("/{id}", mh.Delete)
|
||||
r.Get("/{moduleID}", mh.Read)
|
||||
r.Post("/{moduleID}", mh.Edit)
|
||||
r.Delete("/{moduleID}", mh.Delete)
|
||||
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)
|
||||
r.Get("/{moduleID}/content/{contentID}", mh.ContentRead)
|
||||
r.Post("/{moduleID}/content/{contentID}", mh.ContentEdit)
|
||||
r.Delete("/{moduleID}/content/{contentID}", mh.ContentDelete)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -98,10 +98,10 @@ func (ph *Page) MountRoutes(r chi.Router, middlewares ...func(http.Handler) http
|
||||
r.Route("/page", func(r chi.Router) {
|
||||
r.Get("/", ph.List)
|
||||
r.Post("/", ph.Create)
|
||||
r.Get("/{id}", ph.Read)
|
||||
r.Post("/{id}", ph.Edit)
|
||||
r.Get("/{pageID}", ph.Read)
|
||||
r.Post("/{pageID}", ph.Edit)
|
||||
r.Post("/{selfID}/reorder", ph.Reorder)
|
||||
r.Delete("/{id}", ph.Delete)
|
||||
r.Delete("/{pageID}", ph.Delete)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user