mirror of
https://github.com/typicode/json-server.git
synced 2025-08-02 02:53:21 +08:00
Foreign key suffix (#570)
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user