Adding routes for getting link records based on a record Id.
This commit is contained in:
parent
bfe2bb5a23
commit
52b594ab39
|
@ -6,6 +6,16 @@ const { READ_MODEL, WRITE_MODEL } = require("../../utilities/accessLevels")
|
||||||
const router = Router()
|
const router = Router()
|
||||||
|
|
||||||
router
|
router
|
||||||
|
.get(
|
||||||
|
"/api/:modelId/:recordId/:fieldName/links",
|
||||||
|
authorized(READ_MODEL, ctx => ctx.params.modelId),
|
||||||
|
recordController.fetchLinkedRecords
|
||||||
|
)
|
||||||
|
.get(
|
||||||
|
"/api/:modelId/:recordId/links",
|
||||||
|
authorized(READ_MODEL, ctx => ctx.params.modelId),
|
||||||
|
recordController.fetchLinkedRecords
|
||||||
|
)
|
||||||
.get(
|
.get(
|
||||||
"/api/:modelId/records",
|
"/api/:modelId/records",
|
||||||
authorized(READ_MODEL, ctx => ctx.params.modelId),
|
authorized(READ_MODEL, ctx => ctx.params.modelId),
|
||||||
|
|
Loading…
Reference in New Issue