Allows for alternate foreign key attribute names, eg snake case (post_id). Defaults to 'Id' (#556)

This commit is contained in:
Benjamin Bruneau
2017-06-27 14:28:34 -04:00
committed by typicode
parent 02c3ea936e
commit f1d7677d01
5 changed files with 17 additions and 9 deletions

View File

@ -42,9 +42,8 @@ function createApp (source, object, routes, middlewares, argv) {
try {
router = jsonServer.router(
is.JSON(source)
? source
: object
is.JSON(source) ? source : object,
argv
)
} catch (e) {
console.log()