1
0
Fork 0
mirror of synced 2024-06-23 08:30:31 +12:00

Adding routes for getting link records based on a record Id.

This commit is contained in:
mike12345567 2020-09-29 12:02:06 +01:00
parent a76a7525e3
commit ecfca1dfab

View file

@ -6,6 +6,16 @@ const { READ_MODEL, WRITE_MODEL } = require("../../utilities/accessLevels")
const 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(
"/api/:modelId/records",
authorized(READ_MODEL, ctx => ctx.params.modelId),