Foreign key suffix (#570)

This commit is contained in:
typicode
2017-06-28 23:05:21 +02:00
committed by GitHub
parent 3ec3dec19a
commit 9bff1b6f3d
11 changed files with 169 additions and 21 deletions

View File

@ -40,10 +40,11 @@ function createApp (source, object, routes, middlewares, argv) {
let router
const { foreignKeySuffix } = argv
try {
router = jsonServer.router(
is.JSON(source) ? source : object,
argv
foreignKeySuffix ? { foreignKeySuffix } : undefined
)
} catch (e) {
console.log()